I would say for shell scripting, it would probably be bash, only because of how well I know all the stuff. Despite the fact I have zsh as my shell, I still use bash. Stubborn memory and all that.
For scripting, and I might be committing heresy here, but I actually prefer Python.
The amount of times I’ve spent hours trying to achieve something using bash and command line tools only to find a 5 second well documented thing for Python is too much. Not only that, but after 6 months after I wrote my Python script, I can generally read and understand what I wrote.
Place to discuss or help others with shell scripting.
Shell scripts I mainly write POSIX compliant and I run it in
dash
. As login shell I usezsh
but scripts are much faster when you run it indash
or other light POSIX compliant shell. Of coursezsh
orbash
have extra features which you can use in your scripts. Anyway in most cases these functions aren’t necessary. For more complex things I also use Python but it isn’t good for parsing shell commands output so shell scripts are better in this case. Python is good when you must do operations which shell not doing well (e.g. parsing JSON, complex request or something like that) but isn’t good for thing which must run as fast as possible, because Python (default implementation) is really slow.Do you have any resources on
dash
or POSIX scripting? I tried having a look and most of the resources essentially regurgitate what you wrote. I would find it beneficial to write a POSIX script for it to be compatible across Linux/Mac/Win for work purposes, so I’m definitely interested in any resources. Thanks!