Mouse wrote:
[...] Unix
never ever decided what to do with a file by its
extension but t does by its magic number [...]
Unix traditionally *doesn't* do
that either.
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, and different kinds of executable
binary formats? It looks in the file for its header and is starting
the correct command interpreter for running that file or set up the
environment for executing a binary executable.
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. The mechanism is only
existent once in the system but the system call is not using any naming
conventions of file extensions to do this.
As for the whole "determine what to do based on content" idea, it's a
reasonable default, but it really needs to be overridable. To pick the
example that coems to mind most readily, I have not infrequently wanted
to take a file and print it twice, once treating it as text and once
treating it as PostScript code. (PostScript code can be, and often is,
plain text.)
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.
Regards,
Holm
--
Technik Service u. Handel Tiffe,
www.tsht.de, Holm Tiffe,
Freiberger Stra?e 42, 09600 Obersch?na, USt-Id: DE253710583
www.tsht.de, info at tsht.de, Fax +49 3731 74200, Mobil: 0172 8790 741