hey @vaporeon_ is there a good way to parallelize the following bash script I'm using to convert FLACs to MP3s?
#!/usr/bin/env bash
find "./${1}" | while read -r file; do
case $(file -b "${file}") in
'FLAC '*)
echo "${file}"
ffmpeg -nostdin -i "${file}" -ab 320k -map_metadata 0 -id3v2_version 3 "${file%flac}mp3" -v 16
;;
*)
;;
esac
done
@wallhackio i am just making fun of the posix shell but i am also making fun of you for tolerating it (and not just doing an if…elif…fi chain which does not require you to type esac)
@Lady yeah I could have done it simpler
@wallhackio @Lady case statements are good and well worth the esac
@aescling @wallhackio case statements use § 2.14 Pattern Matching Notation which is absurd and far inferior to grep for any but the most basic usecase
@wallhackio e‐sac