Subj : gnu utils To : MeaTLoTioN From : deon Date : Wed Jan 12 2022 07:48:51 Re: gnu utils By: MeaTLoTioN to All on Tue Jan 11 2022 01:07 pm Howdy, > When trying to get some info from a text file, or command output people tend to do something like; > $ cat somefile.txt | grep something | wc -l > This would spit out the contents of somefile.txt, pipe it into grep to filter out just "something" and then count how many lines > contain > that "something", perfectly a normal thing to do, but it's so bloated and irks me to no end. Instead of this overly bloated command > one-liner, this can all be achieved in just a simple one command; > I dunno, that's just me, my quirkiness lol. Don't judge me =) So this is "old school" or somebody who was taught "old school". When I learnt unix all those decades ago, I was introduced to unix as a "suite of single functional tools" - in that you can combine the tools together to get a complex job done - without having to write that complex tool. I too often find myself doing cat somefile | less when I could just "less somefile", but I normally do that because I am actually planning on greping, awking, wcing, etc... I find it easier knowing that what I want will come from STDIN, and send it to STDOUT, so that the next tool can do its bit, rather than figuring out (often very different) switches to get file read. ....лоеп --- SBBSecho 3.14-Linux * Origin: I'm playing with ANSI+videotex - wanna play too? (1337:2/101) .