tr and sed used be very good but when it comes to file parsing and regex you can't beat perl
(Not sure why people think that sed and tr are closer to shell than perl... )
perl -pe 's/\n/$1,/' your_file
if you want pure shell to do it then look at string matching
tr
andsed
used be very good but when it comes to file parsing and regex you can't beat perl (Not sure why people think that sed and tr are closer to shell than perl... )if you want pure shell to do it then look at string matching
Try this: