The bash script snippet
folder="some folder's name" a="$folder/"*".pdf" if [ "$a" != "$folder"'/*.pdf' ] then echo check fi
I'd expect it to print
check iff there is at least 1 file whose name ends in
echo $a and
echo "$folder"'/*.pdf' print exactly what I'd expect them to print: The former prints the matched paths iff there is at least 1
- Why does bash behave like that?
- How do I make it work?