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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combine each 3 lines in one with sed 1

Status
Not open for further replies.

w5000

Technical User
Nov 24, 2010
223
PL

hello,
I found how to combine every 2 lines into one with sed:

sed 'N;s/\n/\ /'

but how to modify this sed oneliner to get it working for 3 lines?
 
ok, I googled something like:

sed 'N; s/\n//; N; s/\n//'
 
And what about this ?
sed 'N;N;s!\n!!g'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top