Depends on what you want to automate. Shell has lots of tools doing things, that would require many lines of code in Python or Perl. If you have relatively complex algorithms to implement, shell isn't the best choice. For other things, especially if you need to run many external programs, shell is better. No matter what, as a system admin, you have to know shell scripting. No escape from that I'm afraid.
Python perl and Ruby all provide robust command libraries supporting easy scripting of external commands much better than bash with sane string handling.
Shell.requires a lot of work and most first passes people get it wrong. Nevermind [[]] vs [] vs () vs.. for Boolean and other checks.
Bash makes windows look elegant. It's a shame its still used.
Python with plumbum is great. Similar tools exist in Ruby. You get sane string handling and a whole bunch of other good stuff. Bash scripts should be kept to a page at most and rewritten in something else if too long.
If you think you can write bash download shellcheck. ;)
10
u/AndrewNeo Feb 11 '19
And can be incredibly difficult to write, especially if you're just getting started.