4 ms·
You can do with simple IO redirection. For example, the arbitrary pipeline $ cat data.txt | awk '{ print $2+$4,$0 }'|sort|sed '/^0/d' can be written as
by sleepydog 13y ago
You can do with simple IO redirection. For example, the arbitrary pipeline
$ cat data.txt | awk '{ print $2+$4,$0 }'|sort|sed '/^0/d'
can be written as
$ <data.txt awk '{ print $2+$4,$0 }'|sort|sed '/^0/d'
- koralatov 13y agoSome people prefer the first, longer-winded way because it's more explicit. To some --- myself included --- it makes more sense because it explicitly breaks each function into a seperate steps; I'm explicitly telling the system to print the contents of data.txt rather than implictly doing so. I'll happily type those five extra characters for that additional clarity.