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.

@samedamci
mod
31Y

Shell scripts I mainly write POSIX compliant and I run it in dash. As login shell I use zsh but scripts are much faster when you run it in dash or other light POSIX compliant shell. Of course zsh or bash 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.

@mFcGlNBcfr
creator
11Y

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!

Place to discuss or help others with shell scripting.

  • 0 users online
  • 0 users / day
  • 0 users / week
  • 0 users / month
  • 0 users / 6 months
  • 57 subscribers
  • 2 Posts
  • 5 Comments
  • Modlog