3 ms·
"Glueing commands together" is called programming. That's what programming languages are for. Bash etc are just really bad programming languages that lure you i
by virtualized 9y ago
"Glueing commands together" is called programming. That's what programming languages are for. Bash etc are just really bad programming languages that lure you into a trap of unnecessary complexity with their superstitial expressiveness for the happy path in short programs, when you don't need anything besides the built-ins. Decades of ubiquitous UNIX crap tricked you into believing that bash's properties are advantages rather that disadvantages. Sure, you can "glue together" a few commands quickly, but only at the price of horrible edge cases and hours of StackOverflowing for doing the simplest of things.
- logicallee 9y ago>but only at the price of horrible edge cases and hours of StackOverflowing for doing the simplest of things. Or seconds, after you learn the search term "Perl one-liner" and add it to your queries for all your edge cases. Start thinking of perl -we as a Bash built-in function. Suddenly edge cases go from hours to your typing speed into Google. Don't forget to leave a comment with a link to where you found the solution, what it does according to that site, and an apology for the unreadable line noise. If you make changes to what you copy and paste, explain your changes in a comment. (Just in case it sounds sarcastic or ironical, this comment is serious and how I really work. I am really glad for my comments whenever I revisit old scripts.)