Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you need portable shell scripts though? IMHO, it really depends on the context.

If I was about to ship an open source application that came bundled with some shell scripts, then I agree portability is good, so that I know the script would run for people who might not have Bash installed.

But at ${DAYJOB} I much prefer to let Bash run all my scripts, and I make that explicit via ‘#!/usr/bin/env bash’.

Bash is still evolving and the Bash devs are adding new features that I would miss in pure sh. Case in point: A (somewhat) reasonable way of working with arrays.



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

Search: