I'm using bash. Suppose I have a file named filelist, which contains a list of files:
stuff/**/*.csv # to keep it simple (without loops), assume just one entry #*.txt #foo.md #bar.bin And I want to expand that:
ls $(cat filelist) I get:
ls: cannot access 'stuff/**/*.csv': No such file or directory
What I want is to expand that into a list of files which I can pipe to my main app for processing. How can I do that?
set -o|grep glob?noglob off**to do recursive globbing, right? But that needs to be enabled in bash; check the output ofshoptforglobstar!set -omentioned above wouldn't show the other glob-related options, and jumped to expect you'd be running some non-Bash shell by mistake (people do that a lot with scripts). But of course e.g.globstarisn't aset -ooption, but ashoptoption, sigh. So yeah, my bad, sorry about that.