4 ms·
Exactly this. I.e. I often back and forth comment out parts of a pipeline, when debugging. Thus, with `cat [file] | grep [ex]` I could do: cat [file] | les
by samuell 4y ago
Exactly this. I.e. I often back and forth comment out parts of a pipeline, when debugging.
Thus, with `cat [file] | grep [ex]` I could do:
cat [file] | less # | grep [ex]
... to quickly check the output of the unprocessed data, before uncommenting again. This is not possible with `grep [ex] [file]`.
The power of this of course shines the most when having really long pipes, of up to or over 10 parts (which I've had lots of in my career).
(Addendum: Well, I of course actually have an alias s='less -S' to make this even more fluent, so I do:
cat [file] | s # | grep [ex]
... to peek into various parts of a pipeline. -S is for not folding long lines.)