Add a string to the beginning of each file in a folder
for f in *; do echo "whatever" > tmpfile cat $f >> tmpfile mv tmpfile $f done