3 ms·
When will we get an unlimited number of command-line args?
by amelius 5y ago
When will we get an unlimited number of command-line args?
- silon42 5y agoIt would have to be a stream anyway, so you could do it for your program by using a fd=3, like: prog 3<input_args or by using a here-document prog 3<<END args END
- amelius 5y agoWhat if I wanted to do "cat * > ../data.txt" without using special commands designed for large numbers of files?
- PaulDavisThe1st 5y agoOne-by-one processing: find $start [ criteria ] --exec cat {} \; >> ../data.txt
- hnlmorg 5y agoIf you're in a situation where you need unlimited command line args then you're probably better off reading in a config file instead.
- TeMPOraL 5y agoA need could legitimately come up through xargs. I'm reminded of the seemingly absurdly large limits of function arguments count in Common Lisp implementations. They're so large because you often write: (apply #'some-function some-data) which calls some-function with some-data becoming the argument list to the function.