Unix questions - merging of multiple lines to single line

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > August 2006 > merging of multiple lines to single line





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author merging of multiple lines to single line
sundar

2006-08-26, 7:45 am

Hi,

I have a file which contains some 20 lines.

how to append all the 20 lines as single line with comma(,) sepreated.

I am using linux (FC3)

Regards
Sundar

Stephane CHAZELAS

2006-08-26, 1:24 pm

2006-08-26, 01:31(-07), sundar:
> I have a file which contains some 20 lines.
>
> how to append all the 20 lines as single line with comma(,) sepreated.
>
> I am using linux (FC3)


paste -sd, file.in > file.out


--
Stéphane
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com