Click here for important information about

Need to remove carriage return

January 27, 2011 at 21:54:38
Specs: Windows 7
Hi Jim,

I have a huge file close to 30,000 lines.
And i am having carriage returns in some cases that i want to get rid off. When i use the sed command you specified for 7 to 10 lines
sed -e :a -e '$!N;s/\n //;ta' -e P -e D it works for me but when i put it across the big file it doesn't.


I would like to have java socket error in the same line as A.


See More: Need to remove carriage return

January 28, 2011 at 12:53:02
a way .....


# if a line ends with 16 "A", replace the CR with a space
sed -e :a -e '/AAAAAAAAAAAAAAAA$/N; s/\n/ /; ta' datafile

Report •

January 28, 2011 at 21:01:05
Thanks for the reply nails...
somehow some stuff is not working in
my sed script especially sed -n 'H';$(g;s/is: \n/is:/g;p)' it's giving me
command garbled.could you advise a substitute or any other way of doing this.
I am on solaris 10.

Report •
Related Solutions

Ask Question