sed command to replace newlines with spaces
From: Antonio Vázquez (avazquez_at_gmail.com)
Date: 12/23/04
- Previous message: Frank Chiavoni: "Re: Search of Text"
- In reply to: cbaker_at_GOODYEAR.COM: "/etc/sendmail.cf for AIX 4.3.3 ML11"
- Next in thread: Ross Alexander: "Re: sed command to replace newlines with spaces"
- Reply: Ross Alexander: "Re: sed command to replace newlines with spaces"
- Maybe reply: Holger.VanKoll_at_SWISSCOM.COM: "Re: sed command to replace newlines with spaces"
- Maybe reply: Jeff Barratt-Mccartney: "Re: sed command to replace newlines with spaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Dec 2004 18:24:53 -0300 To: aix-l@Princeton.EDU
Hi there!
Anyone knows how to use sed to replace newlines with spaces?
Example:
Before sed:
1
2
3
After sed:
1 2 3
I tried with
sed 's/\n/ /g' input_file
but it didnt work...
Thanks in advance,
-- Tony
- Previous message: Frank Chiavoni: "Re: Search of Text"
- In reply to: cbaker_at_GOODYEAR.COM: "/etc/sendmail.cf for AIX 4.3.3 ML11"
- Next in thread: Ross Alexander: "Re: sed command to replace newlines with spaces"
- Reply: Ross Alexander: "Re: sed command to replace newlines with spaces"
- Maybe reply: Holger.VanKoll_at_SWISSCOM.COM: "Re: sed command to replace newlines with spaces"
- Maybe reply: Jeff Barratt-Mccartney: "Re: sed command to replace newlines with spaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]