I have a file called mail.txt in which lines are printed like below ,i want to put all those lines in to one single line like
Thanks
This is the input
q2VDWKkY010407 2221878 Sat Mar 31 19:37 <Mailer-daemon>
(host map: lookup (my.local.domain): deferred)
<yagyavalkbhatt@yahoo.com>
<ygyalkatt@yahoo.com>
q2VDWKkY010407 2221878 Sat Mar 31 19:37 <Mailer-daemon>
(host map: lookup (my.local.domain): deferred)
<yagyavalkbhatt@yahoo.com>
<yagyav@yahoo.com>
This is the output
q2VDWKkY010407 2221878 Sat Mar 31 19:37 <Mailer-daemon>,(host map: lookup (my.local.domain): deferred),<yagyavalkbhatt@yahoo.com>,<ygyalkatt@yahoo.com> q2VDWKkY010407 2221878 Sat Mar 31 19:37 <Mailer-daemon>,(host map: lookup (my.local.domain): deferred), <yagyavalkbhatt@yahoo.com>,<yagyav@yahoo.com>
So why don’t you just do it?
Note: if you want to get rid of the extra spaces at the beginnings and ends of input lines, you can replace line
#1by