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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]