PDA

View Full Version : How to append text to end of each line of a file



yellowstar5
May 28th, 2006, 03:57 PM
Hi,

Can someone help me with the easiest way to take a file and add a comma (or any other text of course) to the end of each line.

I'm trying various things with cat and echo but so far not quite there.

Thanks,
Neil

colo
May 28th, 2006, 04:15 PM
sed -i "s/$/,/" YOURFILENAMESHERE

yellowstar5
May 28th, 2006, 04:16 PM
OK so it's

sed 's/$/,/'

EASY !