4 ms·
And don't use shell for writing complex scripts, there are better automation tools and languages.
by xvilka 5y ago
And don't use shell for writing complex scripts, there are better automation tools and languages.
- tryauuum 5y agoI'd say that as long as bash script fits on a single screen you won't get any benefit from switching to some other tool or language
- rrll22 5y agoSuch as?
- dqpb 5y agoPython
- BeatQuestGames 5y agoFor example,take my project. https://github.com/Mylab6/PiBluetoothMidSetup https://github.com/Mylab6/PiBluetoothMidSetup While I could of done this in Bash. 1. I don't really like Bash 2. Python is much easier. I did challenge myself to only use Python's built in libraries, but aside from being unable to use Yaml everything works. I can imagine in some environments you might not have access to a Python interrupter though...
- deleted 5y ago[deleted]
- j1elo 5y agoGood point, except if an important part of your complex script is really just plumbing the outputs of one program to the inputs of another. Because that's what shell scripting excels at. Calling an external process is a first-class citizen in shell, whereas it is a somewhat clunky thing (or at the very least, much more verbose) to do in any other languages.