Removing carriage return/line feed using sed

November 13, 2010 at 15:14:50
Specs: Windows Vista
I have a need to turn this input file:

This is line 1 ;
This is line 2 ;
This is line 3 ;

into this:

This is line 1; This is line 2; This is line 3;

and have been unsuccessful using GnuWin32 SED or AWK.
I need the ability to join these lines so that they are all one line with no Carriage Returns/Line Feeds.
If there is SED or AWK script to do this or some other approach, I would appreciate hearing of it.
Thanks.


See More: Removing carriage return/line feed using sed

Report •


#1
November 13, 2010 at 21:33:22
Do you have xargs? This works on my unix system:

xargs < inputfile

xargs is bundled with window's-unix toolkits like cygwin available at http://www.cygwin.com


Report •

#2
November 13, 2010 at 23:19:53
tr -d "\n"

Report •

Related Solutions


Ask Question