For me bash script is always some kind of tricky. I have
web_dir=/tng4/users/ldiao/AQF/wrf-chem-result/
rm "$web_dir""three_days_ago/*.gif"
the error message is
rm: cannot remove '/tng4/users/ldiao/AQF/wrf-chem-result/three_days_ago/*.gif':
No such file or directory
But if I change to
rm "$web_dir"three_days_ago/*.gif""
then it works. There is no spell errors. Can someone explains for me the reason? thanks!
*,?etc are not expanded within quotes, but they are interpreted literally. To find out why they designed it like this, you would probably have to ask one of the language's developers.