Code Snippets/sed
From Yossi Farjoun's Homepage
To change a latex file from having (\ref{eq:blah}) to \eqref{eq:blah} (note the use of eq: in the label!)
sed -e "s/(\\\\ref{\(eq:[^}]*\)})/\\\\eqref{\1}/g" < FarjounShaeffer.tex > text.tex
Mass rename using sed
for f in * ; do n=`echo $f | sed "s/\(.?*\) 1.m4a/\1.m4a/" `; mv "$f" "$n"; done;