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

I did some research about the space after shebang and discovered that it was evidently a (bug/misunderstanding) from the autoconf "portable shell" guide that just stuck, even after being corrected in the modern manual

Links for those who are similarly curious, with the 2nd link being especially fascinating:

https://unix.stackexchange.com/questions/276751/is-space-all...

https://web.archive.org/web/20170215070707/http://www.in-ulm... (courtesy of one of the answers in the first link but separately interesting IMHO)

I will say, I don't know if it's Stockholm Syndrome from years of writing them with the space or what, but I do find the space version nicer to read, doubly so when using the [almost obligatory on macOS] `/usr/bin/env bash` form since it makes all the participants in the shebang space delimited.

I can easily see the counterargument from those misguided souls who hard-code `/bin/bash` that the non space version is their muscle memory and requires less mental parsing



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

Search: