I have a directory structure composed by:
iTunes/Music/${author}/${album}/${song.mp3}
I implemented a script to strip my mp3 bitrate to 128 kbps using lame (which works on a single file at time).
My 'normalize_mp3.sh' looks like this:
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for f in *.mp3
do
lame --cbr $f __out.mp3
mv __out.mp3 $f
done
IFS=$SAVEIFS
This works fine if I go folder by folder and execute this command, but I'd like to have a "global" command, like in 4DOS, so I can run:
$ cd iTunes/Music
$ global normalize_mp3.sh
and the global
command would traverse all subdirs and execute the normalize_mp3.sh
to strip all my mp3 in all subfolders.
Does anyone know if there is a Unix equivalent to the 4DOS global
command? I tried to play with find -exec
but I just get a headache.