[kwlug-disc] Why I Don't Use #!/bin/bash - Shebangs Explained! (Another one by Dave at YSAP)

William Park opengeometry at yahoo.ca
Sun Aug 31 15:45:27 EDT 2025



On 2025-08-31 14:00, John Sellens wrote:
> Perhaps if you run the script with ./script1.sh and the kernel doesn't
> see a #! at the start or some other magic number, the kernel might
> possibly run it with $SHELL.
> 
> On my machine, an executable text file that starts with a : command
> gets run by /bin/sh (not my $SHELL):

That's interesting.  '#!' is checked in fs/binfmt_script.c.  ':' must be 
somewhere else.


More information about the kwlug-disc mailing list