Forum: Cfengine Help
Subject: Re: silly cfengine trick #!
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,19692,19699#msg-19699

A very nice trick indeed - although to be fully correct, Neil, it is the kernel 
who interprets the #!, the shell is not involved in this particular trick 
(although I agree with how powerful the shell is):

On Unix-like operating systems, new image files are started by the "exec" 
family functions. This is where the operating system will detect that an image 
file is either a script or an executable binary. The presence of the shebang 
will result in the execution of the specified (usually script language) 
executable. This is described on the Solaris and Linux man page "execve".


_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to