dudes named ben i need some help passing filenames with spaces in bash
command is:
for file in *.flac; do ffmpeg -i $file -q:a 0 ${file%flac}.mp3; done
it chokes on files with spaces
dudes named ben i need some help passing filenames with spaces in bash
command is:
for file in *.flac; do ffmpeg -i $file -q:a 0 ${file%flac}.mp3; done
it chokes on files with spaces
nostr:npub18k0q9esq0e6r8r8yhu7jxvxzp6gpvjp3wp47zl8dzqec6q4nr07qzjwcjh
Yeah - a few methods described in this page using the find command
https://www.baeldung.com/linux/iterate-files-with-spaces-in-names
This page suggests defining $IFS (as well as a few other methods)
https://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html
Plenty of options available.