[LBo] Running shell script
Billy Pollifrone
billy at silverbaseball.com
Sat Jan 6 14:02:43 CET 2007
Jisao wrote:
> Chris F.A. Johnson wrote:
>>
>> The shebang will not make any difference.
> So, the shebang is mostly something like a comment to the users to
> visually see that the file is a script?
> =
> I am confused about its use. I thought it accomplished some purpose...
> =
> Jisao
> =
> =
It is not a comment to the user. It is a magic number that is looked for
(at a binary level) by the shell. Everything after the magic number up
to a linefeed is used to build a string that the shell will use to
execute the script (with the script being the the first argument argv[1]
to that binary)
The fact that it is a script is only that it is executed. Otherwise,
it's just a textual file.
-- =
Billy Pollifrone
billy AT silverbaseball DOT com
Registered Linux User #433318 (http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://linuxbasics.org/pipermail/qna/attachments/20070106/38b9022c/si=
gnature.pgp
More information about the QnA
mailing list