How would you go about telling whether files of a specific extension are present in a directory, with bash?
Something like
if [ -e *.flac ]; then echo t
The top solution (if [ -e *.flac ];) did not work for me, giving: [: too many arguments
(if [ -e *.flac ];)
[: too many arguments
if ls *.flac >/dev/null 2>&1; then it will work.
if ls *.flac >/dev/null 2>&1;