>> How do you think an unix shell is starting an
excecutable file and
>> trough wich mechanism it knows what todo with an perl script, an
>> shell script, an C-shell scipt, [...]
>> In unix a shell is doing this,
> Actually, in the Unices I know well enough to know
where that is
> done, it's the kernel that does that, not the shell.
Yes, the shell is doing this trough the system calls.
No, I mean the kernel is doing it inside execve(). On the Unices I
know well enough to talk about in this regard, recognition of #!, of
ELF vs a.out vs whatever, etc, is done entirely in the kernel as part
of execing the executable. The shell is totally out of the loop.
[...] but the system call is not using any naming
conventions of file
extensions to do this.
True. It's entirely driven off file contents. I don't know of any OS
where execve() pays any attention to what's in the pathname beyond
handing it to the filesystem layer to locate the relevant file.
I usually have
to end up running it through a text-to-PS filter
because the printing subsystem insists on treating everything that
looks enough like PostScript as PostScript. :(
Oh man. Could you please take a
look to the print filters in the
printing system? This again has nothing todo wit unix as such.
It's only code that is maintained as part of the system, shipped as
part of the system, and is the default unless the admin goes to some
minor (or sometimes major) trouble to install something else.
Where do _you_ draw the "this is part of Unix" line?
As for print filters, I hvae yet to find any documented option that
allows me to tell it whether I want to print a particular piece of text
as text or as PostScript code. (Because the content is exactly
identical, it cannot even in principle tell on its own.) I haven't run
into this problem on more than a half-dozen systems, though; I don't
print very much, and even less on systems other than my own. But the
details of the issue are not my point; my point is that the content is
not always enough to tell.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B