Well thanks a lot but I have another Problem
I try to solve.
I habe one simple Textfile
with entries like this, for example:
file1
file2
file3
file4
...
file200
And I want to add Strings at the beginning on the line.
Like this
word1 file1
word1 file2
...
I hope you can help me
sincerely,
Blackbox
create a loop to read the file line by line, and then you can do anything to the lines inside the loop:
cat myfile | while read line
do
echo "word1 $line" >> mynewfile
done
daPeach
3
uuoc !
cp myfile myfile.bak
while read line
do
echo "word1 $line" >> myfile
done < myfile.bak
or use sed
sed -i 's/^/word1 /' myfile
jp2542a
4
awk '{print "word1 " $0}' myfile >>newfile