J
Jerry Maguire
Hi,
I would like to write a perl script to open and file and add a prefix to all
the lines of that file.
The file will be like:
name1blah
name2blah
name3blah
I have created the following script:
#!/bin/sh
cat test |
while read name
do
printf 'new'$name>>newfile.txt;
done
Now the problem is it is adding all the lines in one line.
The output is:
newname1blahnewname2blahnewname3blah
jerry
I would like to write a perl script to open and file and add a prefix to all
the lines of that file.
The file will be like:
name1blah
name2blah
name3blah
I have created the following script:
#!/bin/sh
cat test |
while read name
do
printf 'new'$name>>newfile.txt;
done
Now the problem is it is adding all the lines in one line.
The output is:
newname1blahnewname2blahnewname3blah
jerry