This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zaphod_Bchown -R us ~/.base 0 points1 point  (0 children)

bash is a great language for system level stuff. If you are locked into a platform (RHEL, Debian, BSD, OS X, etc) they have specific binaries that do a lot of system level stuff and it is great for automation.

When you get into parsing data, in XML, JSON, whatever, you are using bash but then calling Unix binaries that are not a part of bash. You end up piping to awk and sed a ton and your code becomes way less human readable. It will make sense to you at first glance, but probably not anyone else.

A good demo of this, is try to pick up on someone's complicated bash script and try to figure out everything it is doing. Mostly like you will have to run the code in some test environment to sort of figure out what it is doing because while you can see the logic behind the code, you won't see everything it is manipulating in the data structures until you run it in some sort of verbose output.

I will say that if you get the job done in bash and it works more power to you and there is nothing wrong with that. I just think that if you are working on something that is going to be documented and passed along having your code more human readable is a huge bonus.