3 ms·
Bash is a good tool if the script is short enough, but if you have to write more than 10 lines, then use a real language.
by GoblinSlayer 4y ago
Bash is a good tool if the script is short enough, but if you have to write more than 10 lines, then use a real language.
- sophacles 4y agoNonsense. That's a terrible metric. If i need to run 11 commands in a row, suddenly i need to make sure new tooling is installed in my instance and/or ship a binary? What if that 11 lines is setting up some networking? Now i need to go write a 400 line go program to use netlink to accomplish the same task? Or should I condense that to 80 lines of go to shell out the commands that replicate the 11 lines of simple bash? There are plenty of reasons to do this, I have done it more than once. None of those reasons are "crossed an arbitrary magic number of 'lines of shell'".
- sshd 4y agoIf my bash script is more than 10 lines, I switch to python and if that's more than 10 lines I switch to C! And if that's more than 10 lines I use assembly! /s