5 ms·
Slightly off topic, but I noticed it in the article. You can run "wc" directly, you don't need to pipe from cat. Especially since cat on any sufficiently large
by astrea 8y ago
Slightly off topic, but I noticed it in the article. You can run "wc" directly, you don't need to pipe from cat. Especially since cat on any sufficiently large file takes quite a while.
- pgeorgi 8y agoIt's sometimes easier when you're composing command lines: `cat foo | bar` is easier to transform into `cat foo | baz` (esp. when foo or bar are rather long). Also, piping doesn't mean that cat does all its work and only then will it be passed into wc, cat only acts as a rather tiny buffer.
- pletnes 8y agoJust get into the habit of typing < foo bar which is then easier to edit to < foo baz | grep hamspam.
- dvh 8y agoWc will give you filename, if you only need number use cat first.
- tuukkah 8y ago<filename wc