2 ms·
100% sane advice on the "should" front, but I don't always follow the shoulds.. Bash is just too damn fast to whip things up in (even at the risk of endless f
by metadat 4y ago
100% sane advice on the "should" front, but I don't always follow the shoulds..
Bash is just too damn fast to whip things up in (even at the risk of endless footguns). Build up a pipeline of commands, translate into script, done. It's powerful and can scale if common conventions and good practices are used.
For easier debugging I always add a simple flag along the lines of: if $1 = -v then set -x; shift
Obviously shellscripts are a terrible or highly suspect idea when production-grade transactional integrity is critical, but in many cases the swiftness of shell development outweighs the cons when the goal is to Get Things Done.
The shell is a pretty sweet interface.
- cjvirtucio 4y agoit's so much easier to glue tools together with it. I'd end up writing more code if I had used python's subprocess package or ruby's IO package. as long as I don't need a complex data structure of some sort.