Add an extra line to a number of files

echo "LINE TO ADD"  | tee -a FILE*

Run a command recursivly on an entire directory

find . -type f -print0 | xargs -0 dos2unix

Simple for loop

This is useful if you want to run the same command on a list of IP addresses Here we have a file called ip-list

And here we have the script that will loop through the list if IP addresses and perform a specific command

machines=`cat $machine`
echo Starting
for line in ${machines}; do
    echo ${line}
    scp -i privatekey file root@${line}:/folder/you/want/