Date: Tue, 17 Apr 2001 18:12:51 -0500 (CDT) From: David Scheidt <dscheidt@tumbolia.com> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: freebsd-questions@freebsd.org Subject: Re: command script file Message-ID: <Pine.BSF.4.21.0104171806340.20719-100000@shell-2.enteract.com> In-Reply-To: <Pine.SOL.4.21.0104171851150.21471-100000@onyx>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 17 Apr 2001, Zhihui Zhang wrote: : :If I have the following file named doit: : :# cat doit :pwd :ls -al :# chmod u+x doit. :# ./doit : :It runs OK even if there is no #!/bin/sh at its first line. Is this :feature implemented in the shell or kernel? If in shell, how does it :implement it? Thanks. : The shell attempts to exec the file. If that fails, it's passed to the shell with the name of the file as the first arguement. See exec(3) to see how you can do it. -- dscheidt@tumbolia.com Bipedalism is only a fad. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0104171806340.20719-100000>