Live data from Hacker News

Bash scripts are brittle – simple error handling in bash

notifox.com

11–15 of 15 posts

Re: Bash scripts are brittle – simple error handling in bash

#12
ok so some people call it "brittle" it's 2026, what would impress were if people raised the issues and helped fixing them!

writing in another language, how much more complexity do you want to introducing :)

I believe bash scripts can be anything you want them to be, if they are useful to you then happy day's.

if you hit performance issues or want to experiment else where cool.

error handling in ruby is almost impossible

error handling in python is wildly hit and miss

error handling in golang is rather annoying

error handling in powershell, good luck you will need it

error handling in perl ok i'll stop now you probably get the picture.

Re: Bash scripts are brittle – simple error handling in bash

#13

ok so some people call it "brittle" it's 2026, what would impress were if people raised the issues and helped fixing them! writing in another language, how much more complexity do you want to introducing :) I believe bash scripts can be anything you want them to be, if they are useful to you then happy day's. if you hit performance issues or want to experiment else where cool. error handling in ruby is almost impossi…

I'd take consistent but annoying over pleasantly occasionally explosive

Re: Bash scripts are brittle – simple error handling in bash

#14

I believe that Bash scripts should be trivially short and simple. As soon as any complexity is introduced they should be written in another language.

Perl was written to write more complicated bash scripts. It's so seamless to call and handle shell commands and the first class regexes make it terse in a way that's appropriate for this use case.
Post reply on HN