Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
I Dislike Shell Scripting (nales.org)
5 points by Nales on Feb 15, 2023 | hide | past | favorite | 5 comments


I like bash for programs that go in a straight line from bottom to top and where you don’t need to think about quoting so much. If there are loops, conditionals, and such, you are better off with a real language. If you stick to the standard library and don’t mess around with pip, Python is fine for simple scripts.

(I love writing bash scripts that do loops by writing an awk 1-liner that you pipe into bash, I don’t have to read the awk manual to do this, whereas control structures in bash are so far from the mainstream that I have to look them up in the manual every time I need to use them… you really aren’t supposed to do this because script injection is possible. The shell scripting mafia says, “use xargs” but that involves reading an awful man page for two hours so you can do something that takes two minutes in a language not so far from the mainstram.)



I have just read your article. This is interesting, I keep that in mind if one day I change my mind about Go and use it.


Nales: FYI the site is not responding, article not currently accessible.


Thank you for your report. This is strange, everything is alright on my side. I suppose I will have to instigate this issue more later.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: