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

I don't believe it's a bash-ism, I would guess it's GNU getopt defining the `-i` as only optionally requiring an argument, versus the built-in getopt that BSD is using:

https://git.savannah.gnu.org/cgit/sed.git/tree/sed/sed.c?h=v...

https://github.com/freebsd/freebsd/blob/release/7.0.0/usr.bi...

So, while your interpretation of the shell splitting is correct, it's the different getopt declarations that cause this pain



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

Search: