file correction

Jeff Harrison jeffaharrison at yahoo.com
Sun Jul 10 12:49:06 PDT 2011


----- Original Message ----

> From: ROBERT PULLIAM <pulliamr at earthlink.net>
> To: filepro <filepro-list at lists.celestial.com>
> Sent: Sun, July 10, 2011 3:36:34 PM
> Subject: file correction
> 
> I have a file that is one long string.  ie   
>st*234*685~bd*tuy*45*cvb~se*123*1234567
> 
> iI would like to find all the ~  and replace with a manual line feed.  At 
>present I am copying  the  files from unix to windows and using word with 
>replace to do this.  Would  like to be able to do it in unix,   Using sco unix.
> Is there an ed, sed  or grep comand that will find and replace?
> Any suggestions - thanks - Robert  Pulliam MD

You can probably do it with all the programs you listed.  I would use tr as 
follows (untested):

tr '~' '\n' <input_file >output_file

Good Luck.

Jeff Harrison
jeffaharrison at yahoo.com

Author of JHImport and JHExport. 


More information about the Filepro-list mailing list