17 lines
288 B
Bash
Executable File
17 lines
288 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
fail() {
|
|
echo "failed to process $f, exiting"
|
|
exit 1
|
|
}
|
|
|
|
for f in ./*.flac
|
|
do
|
|
ffmpeg -i "$f" -q:a 0 -vn "$(basename "$f" .flac).mp3"
|
|
(( $? )) && fail
|
|
echo "$f success"
|
|
done
|
|
|
|
read -rep "success. delete files? [yn] " YN
|
|
[[ ${YN,,} == y* ]] && rm ./*.flac
|