Print

Print


> I'd be inclined to quarrel with this interpretation, Pete.  What the
> kernel is doing isn't taking the script and running it as a binary --
> specifically its:

[I can never resist a quarrel :-)]

Actually what you said I completely agree with. So, yes, its not a binary
in the sense that the script magically becomes a binary. But it is in
the sense that you can treat the script as a binary and use it in all
situations that would normally require a binary file. Which is not true
of a script without the hash-pling mark. If someone whites such a scripot
and someone with the wrong shell tries to execite it thne it fails.

So the smartness has to be in the program to run a string of smmands, ture. But
then all the programs we are discussing (shells, perl, pascal intrepretters
etc...) are basically designed to run a sequence of commands, or else why
would you want to write a script for tem ? So its a bit of a self
fulfilling prophecy. Seds a bit of an odd one out because you dont
normally think of it as intrepreting programs.

Interestingly I just tried using it recursively and that works too, you can
write a script which is an intrpretter and then use that to be the binary
for another script written in that scripting language.

very nice :-)

-pete.