Count Files Matching A Certain Pattern Option 1 - recursive ls -1f | grep wav | wc -l Option 2 - only current dir find . -maxdepth 1 -name "*wav" | wc -l Rename A File mv worker.sh mp3_worker.sh Count Lines in a File wc -l results.txt Remove Duplicate Lines from A File sort -u results.txt Copy Files from Remote Server to Local Machine (ec2) scp -i "your_ec2_key.pem" -r [email protected]:/home/ec2-user/files ~/Desktop/your_dir/ Loop Over Files and Execute Command Writing Output to Text File (example uses aubio.org music software) for f in *.mp3 do var=$(aubio tempo $f) echo $var ", $f" echo $var ", $f" >> results.txt done Create a Copy of A file cp mp3_worker.sh wav_worker.sh Combine Multiple Text Files (note >> means append, > will overwrite existing in all_results.txt) cat results.txt wav_results.txt >> all_results.txt