Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sed editing of file with x\0a LF

Status
Not open for further replies.

ytakbob

Programmer
Jul 20, 2000
105
US
attempting to eliminate all line Feeds from a file..
using the following

cat filename | sed "s/\^J//g" > newfile

I receive the error:
sed: 0602-410 The first regular expression cannot be null.

so how do I eliminate LInefeeds from a file ??

Thanks folks!
Bob
Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
 
Hi,

Try
sed "s/^M//" filename > newfile

You get "^M" by typing Control-V then Control-M.
 
I guess what I should have said is I am trying to eliminate all X&quot;0a&quot;'s - Line Feed <lf>

X&quot;0d&quot;'s are Carriage Returns <cr> - I am able to take care of those using the above syntax with ^M

but line feeds x &quot;0a&quot;'s seem to cause the command to ...well... line feed..it seems like I need to &quot;quote this somehow.....

care to take another schwing !?!?!

:)
Bob Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
 
that's the ticket !
thanks Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top