find . -name "*.mp3" -exec mp3info {} ;
find: ‘mp3info’: No such file or directory
Copy
which <executable>
#Example:
which sudo
# sudo : acronym for superuser do or substitute user do
## sudo runs an elevated prompt without a need to change your identity.
## Depending on your settings in the /etc/sudoers file :
### you can issue single commands as root or as another user.
function mp3info() {
TRACK_NAME=$(basename "$1")
FILE_DATA=$(file "$1" | awk -F, '{$1=$2=$3=$4=""; print $0 }')
echo "${TRACK_NAME%.mp3} : $FILE_DATA"
}
Copy
$ export -f mp3info
$ find . -name "*.mp3" -exec bash -c "mp3info "{}"" ;
01 - Das Trinklied vom Jammer der Erde : 128 kbps 44.1 kHz Stereo
02 - Der Einsame im Herbst : 128 kbps 44.1 kHz Stereo
03 - Von der Jugend : 128 kbps 44.1 kHz Stereo
04 - Von der Schönheit : 128 kbps 44.1 kHz Stereo
05 - Der Trunkene im Frühling : 128 kbps 44.1 kHz Stereo
06 - Der Abschied : 128 kbps 44.1 kHz Stereo
Copy