3 ms·
> I find "cat full | ..." keeps the left-to-right flow of a command nicely Sorry, I don't buy it. You don't read files like this: cat file | less And you
by teo_zero 3y ago
> I find "cat full | ..." keeps the left-to-right flow of a command nicely
Sorry, I don't buy it.
You don't read files like this:
cat file | less
And you don't compile C programs like this:
cat hello.c | gcc -xc -
Actually using less, grep (and even gcc) as filters is more confusing to "those less familiar with shell work".
- dspillett 3y agoFor a single command acting on a file, especially with no other parameters, like your less example, you are right and I wouldn't, though I have seen it often. There is practically no "left-to-right" flow to break. Longer examples is where I would use it. Also not in circumstances where explicitly acting on a file like your GCC example. It is unlikely that GCC will commonly be used as part of a more collect pipeline of commands. Note that I said "I use it", not "I always use it, without fail, no other option makes sense ever". Different tools, different jobs (this is what the Church of Latter Day Demogifiers usual don't accept in this context).