View Single Post
Old 18th May 2019, 13:17   #3  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Another Bash example. This is the script I use to process my audio CD backups:
Code:
#!/bin/bash -x
set -e
cd FLAC
for n in *.wav ; do
flac --no-preserve-modtime -V -8 "$n"
done

cd ..
for n in *.wav ; do
qaac --abr 192 --no-smart-padding --rate keep -o "MP4/${n%.*}.m4a" "$n"
done

for n in *.wav ; do
opusenc  --bitrate 192 --comp 10 --framesize 60 --ignorelength "$n" "Opus/${n%.*}.opus"
done
Not that I'm saying anything for/against using the format tools, it was more about the shell substitution and regex abilities ( ${n%.*} ).

Last edited by qyot27; 18th May 2019 at 13:20.
qyot27 is offline   Reply With Quote