by cushychicken · 4y ago · 0 comments
I just threw out a few hundred lines of Python in exchange for ten lines of bash script + cron job to automate nightly app updates. Way easier to get working, way less painful to debug.
I grant, however, that it's not particularly large. What is?
So what you need is a good language that lets you concisely express ways of calling out to other programs. Not necessarily a language that's backward-compatible with whatever seemed like a good idea for a CLI in 1979.
All that in... (goes off to wc -l the script) ...twenty lines of bash, a third of which are comments.
> language that lets you concisely express ways of calling out to other programs
Seems like bash meets those requirements to me, dawg. /shrug
Still wish someone would give me an idea of what "large" means in bash scripts.
- concise (another operator instead of '|' is fine, but no extra parentheses, quotes etc.)
- performant (at least as fast as Bash)
- standalone (extensions discouraged)
Many simple file and data munging tasks can be done on cli 100x faster with 10x less code than Python, using rudimentary bash-fu.
I already see a wave of Python undoing in the data world. Python becoming the cobol of this field.
rudimentary bash-fu
I wish there were some guides on how to get past rudimentary bash-fu. My bash text munging is still pretty rudimentary. I'd love to get to journeyman text smash status.
Sorry even I can't say that with a straight face XD