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

That shebang will work on GNU link based systems, but might not work elsewhere. I know that’s the most popular target, but not working on macOS, BSDs, or even busybox.




I just tried the one you are replying to and it worked great on macOS. I frequently use a variant of this on my Mac.

That’s interesting. I wonder when that changed. Maybe FreeBSD supports multi arg shebangs now, too

The -S argument to env splits the argument on whitespace.

The shell doesn't support anything, it just passes the string to env.

So beware quoting and other delimiters that won't work the way you expect.




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

Search: