3 ms·
As a dual wielding hat person (sysadmin and programmer), stay away from bash programming. Use a modern scripting language like Python or Ruby otherwise you are
by vartosis 13y ago
As a dual wielding hat person (sysadmin and programmer), stay away from bash programming.
Use a modern scripting language like Python or Ruby otherwise you are entering a world of pain.
http://mywiki.wooledge.org/BashPitfalls http://mywiki.wooledge.org/BashPitfalls
- ygra 13y agoI found PowerShell quite capable as both a shell and a programming language, scaling up to larger scripts and yet remain readable. Pash sadly isn't complete enough to be used, though.
- nathan_long 13y agoDependencies are another huge issue if you want to be cross-platform. A Ruby script (for example) relies on the Ruby interpreter, which works the same cross-platform. If it has other dependencies, there's an established way to declare and install them. In contrast, a bash program calls out to lots of little programs: sed, awk, grep, etc. Different platforms have different implementations which take different flags, etc. My friend and I just spent a couple of days getting some bash scripts that ran fine under Cygwin to also run on OSX. It was painful.
- vinceguidry 13y agoRuby system scripts assuredly do not work the same cross-platform, particularly if they have to call to C libraries. Expect to have to rejigger them just as you would bash.