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

> My biggest issue with POSIX is the use of the backtick which is difficult to read and parse.

POSIX also has $(command) for command substitution. It can certainly be annoying when it's not used, though. I think shellcheck will recommend it over backticks.



Thanks, I didn't know that, but then I almost never target POSIX. My next complaint would be the use of '[' as a test rather than my preferred '[['.

Edit: After looking for a problem with POSIX, I found this obscure issue that may well catch out people as under POSIX, IFS is a terminator rather than a separator: https://mywiki.wooledge.org/BashPitfalls#IFS.3D.2C_read_-ra_...




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

Search: