5 Feb
2007
5 Feb
'07
18:21
Jan, On Monday 05 February 2007 10:15, Jan Karjalainen wrote:
How do I go through a text file and add ",on" at the end of each line?
Sed is the tool you want to use. sed -e 's/$/,on/' textFile >textFileWithOn If you have several target files, do this: for targetFile in textFile1 textFile2; do sed -e 's/$/,on/' "$targetFile" >"${targetFile}WithOn" done If you want to effect an in-place change, you'll have to manipulate the input and / or output files separately.
/J
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org