On Wed, Apr 07, 2010 at 07:31:11AM -0700, dave wrote:
> On Wed, 2010-04-07 at 08:45 -0400, Kent A. Reed wrote:
> > 
> > Use magic file extensions if you must but please don't make them 
> > mandatory. That's a "convenience" that has driven me mad in the M$ world.
> >  
> > Regards,
> > Kent
> > 
> IRRC some types of files use a magic number (identifier) as the first
> entry in the file. 

Yes, unix has long avoided reliance on filename extension, but it does
use magic.  Try "man magic" or "man file"

When we begin a script with "#!" (as in #!/bin/bash), that is
supplying the 16 bit "magic". (There's some history at
"http://en.wikipedia.org/wiki/Shebang_(Unix)" , under the heading "As
magic number" )

The "file" command identifies file type primarily by interpreting a
file's magic, if it's not a directory, or otherwise identified by the
filesystem itself.

We can write a bash script, and give it a useful name without extension,
so it looks like a simple verb when we use it. Or we can call the bash
script "some_verb.perl". It will still be run through the bash
interpreter, because of its magic. The extension does nothing.

Erik

-- 
"Those who live by the GUI, die by the GUI"
      - Duncan Roe, on luv-main ML.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to