Prepend the text “foo” to the start of every line in file.
With sed:
|
1 |
sed -i.bak 's/^/foo/' file |
With perl:
|
1 |
perl -e 'while (<>) {print "foo"}' < infile > outfile |
Taken from:
Prepend the text “foo” to the start of every line in file.
With sed:
|
1 |
sed -i.bak 's/^/foo/' file |
With perl:
|
1 |
perl -e 'while (<>) {print "foo"}' < infile > outfile |
Taken from:
Talk with a senior engineer for practical recommendations—no obligation.
Reliable Penguin provides managed web hosting, systems administration, website and server migrations, and expert consulting.
Submit the form—or for immediate service call 866-649-7984.