I'm quite new to Bash scripting. I have a "testscript", which I used as the basis for a more advanced / useful script:
#!/bin/bash files=$1 for a in $files do echo "$a" done
When I call this without any quotes it just picks up one file in a directory:
But when I call it with quotes it works correctly and picks out all the text files:
What is going on here?