I watched Reformat the Planet on pitchfork which got me to download some chiptunes (bitshifter, covox, and aonami). As soon as I went to work with the audio files, I ran smack right into a bash quoting problem. Most audio files have spaces in them and my bash functions treated spaces as delimiters.

Fixing them up by quoting every variable (bash rule #1 = quote all variables, David Pashley has a good intro to writing robust shell scripts), we get the following:

each() { cmd="$@" while read line; do c=$( echo "${cmd}" | sed "s/{}/'${line}'/g" ) eval "${c}" done } file_change() { IFS= $@ shift for f in "$@" ; do if [ -f "${f}" ]; then ls -alh "${f}" fi done } mv() { file_change $(which mv) "$@"; } chmod() { file_change $(which chmod) "$@"; } chown() { file_change $(which chown) "$@"; } touch() { file_change $(which touch) "$@"; }