I'm thinking of something like ls @files.lst
doing what ls [contents of files.lst]
would do, globbing included.
I think I'm remembering the above syntax, (at-sign, filename) from somewhere (maybe an old Digital OS from sometime before the last ice age?). Searching for permutations of Bash, indirect, arguments, list, ... isn't getting me anywhere. I know there are ways to write this into the (every?!) script, but does bash already implement it in some more general way that so has far eluded me?
Update: This is for BSD/Darwin (ATM) but I appreciate the more general answers, too. I'm on a Mac, if that's not now obvious, so computational inefficiency won't hamper anyone else and the workload is pretty small anyway. Of more interest is the ability to use existing shell scripts that were written to receive their commands from the command line, and most of the time, they will.
@
syntax for reading arguments from a file instead of the command line. GCC might be the most popular of them - maybe even the originator of the syntax, I don't know - but I bet it inspired plenty of other less popular programs to do the same thing. Perhaps that could account for what you're remembering. (I do want to point out that in general the syntax is a feature of the program, not the invoking shell.) – David Z Nov 28 '21 at 02:00