▲ | w4rh4wk5 2 days ago | |
We've transitioned all of our Bash scripts over to Ruby and are pretty happy with it. We almost exclusively use only Ruby's standard library. 'fileutils' and 'rake' have a bunch of nice functions to replace Bash scripts. See, FileUtils for things like rm_rf, rake provides sh which can execute commands, then there's FileList and Pathname. It even comes with its own template engine (erb) if you need that. Regexes as first class citizens are awesome for shell scripting. I can also recommend using optprase + ostruct for commandline argument parsing. | ||
▲ | wiz21c 2 days ago | parent [-] | |
I usually go with python when my .sh/.bat script files gets too complex. So I guess we wento down the same road. Like ruby (I guess), python is very pleasant to work with for small scripts and it's portable between linux and windows, which is really cool (at least in my use cases) In python, glob, Path and subprocess are mostly all I need... |