I want to be able to prepend a string to the beginning of each text file in a folder. How can I do this using bash on Linux?
And you can do this using sed in 1 single command as well
for f in *; do sed -i.bak '1i\ foo-bar ' ${f} done