3 ms·
> cat just outputs file contents Well it does but... its actual purpose is to concatenate multiple files. All Unix commands can read files so you don't need a
by Lio 3y ago
> cat just outputs file contents
Well it does but... its actual purpose is to concatenate multiple files.
All Unix commands can read files so you don't need any special tools for that.
E.g.
grep "^\s*fn\s" < main.rs | wc -l
or in grep's specific case just
grep "^\s*fn\s" main.rs | wc -l