Why am I getting this syntax error?
Posted: Thu Oct 17, 2019 9:17 pm
When I run the following from the terminal of Raspbian in my Pi 4B I get a "syntax error near unexpected token 'do'":
sudo for f in *.flac; do ffmpeg -i "$f" "${f%.flac}.wav"; done
rm *.flac
This batch file statement comes from the GPIO Music Box example. Its purpose is to convert .flac files to .wav.
Any help is appreciated. Thanks.
sudo for f in *.flac; do ffmpeg -i "$f" "${f%.flac}.wav"; done
rm *.flac
This batch file statement comes from the GPIO Music Box example. Its purpose is to convert .flac files to .wav.
Any help is appreciated. Thanks.