2 ms·
One of the big reasons to learn the old fashioned tools is that they're always there. Period. Yes, you have node on your server, and your development machine, b
by Sanddancer 11y ago
One of the big reasons to learn the old fashioned tools is that they're always there. Period. Yes, you have node on your server, and your development machine, but what about when you need to do some work over on the database server? Those antique shell utilities have saved my ass when my more preferred methods weren't available to me.
Though the example in question, you're putting in a huge amount of boilerplate code that you're going to have to write a wrapper for with each new script. Most of the basic tools -- sed, grep, awk, even perl -- tend to have a quick and dirty form that does what most people need, with the more powerful portions at the ready. The "new and improved" tools tend to end up a lot like your examples, and get swiftly ignored because it becomes a pain in the ass to type the same thing over and over again, or they grow shortcuts and secrets as time goes on until they too are full of history and shortcuts that only the old timers know. Someone's going to eventually want a patch for a command line flag that wraps all that boilerplate in, and you're going to end up with perl's -n flag, and the horribly ugly code of
perl -ne '/^var/ and print'
which will confuse beginners, and be a godsend to veterans.
- zimpenfish 11y ago> what about when you need to do some work over on the database server? You get the angry DBA coming over with a bat to smack sense into you because You Do Not Work On Servers.