3 ms·
> "I don't know and I don't want to learn" instead of blaming a language. I'm a staunch proponent of "anything over 100 lines should not be written in bash". Y
by Grimburger 5y ago
> "I don't know and I don't want to learn" instead of blaming a language.
I'm a staunch proponent of "anything over 100 lines should not be written in bash". You can do many more things easier and with less google-fu to find your niche SO answer.
Unless you have absolutely no clue about other scripting languages that already exist on Debian, just don't do it, there's so many better options that actually last and can even be read by other people.
- 0xbadcafebee 5y agoI used to say the same thing, back when the only bash I knew was from whatever tidbits I picked up as I needed them. Then I got more familiar with bash. Now, nearly everything I write is bash. I have realized that more complex languages mostly just make things.... more complex, rather than simplifying them. For simple solutions I stick to simple tools, even if it takes more than 100 lines. Here's one tool I wrote in Bash. It's an alternative to Terragrunt. 616 lines. https://github.com/pwillis-els/terraformsh https://github.com/pwillis-els/terraformsh Here's another one. A static-app package manager/versioner/pinner thing. 409 lines of POSIX shell (the code is intentionally ugly, don't take this as an example of good code). https://github.com/peterwwillis/clinst/blob/main/clinst https://github.com/peterwwillis/clinst/blob/main/clinst For both of these tools, 90% of what they do is just managing environment variables and calling other programs, and that's what shell scripts are best at.