add 1 #ff0000 at the end of each line

March 29, 2011 at 23:17:44
Specs: Windows Vista
Hi
i have a editfile with list of numbers:

3345
3346
3378
3890
etc'
I want to add " 1 #ff000" after every number, seperated with one space. no tabs, please.


See More: add 1 #ff0000 at the end of each line

Report •

#1
March 30, 2011 at 03:16:53
#!/bin/bash
IFILE=input.txt
OFILE=output.txt

while read line
do
    echo -e "$line 1 #ff000" >> $OFILE
done < $IFILE

You can also do this directly at the console prompt:
while read line; do echo "$line 1 #ff000" >> output.txt; done <input.txt


Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!

Report •

#2
March 30, 2011 at 07:10:55

Report •
Related Solutions


Ask Question