/etc/magic entry for GIF files?

Nick Sayer nsayer at uop.edu
Thu Oct 25 02:17:02 AEST 1990


It is my understanding that GIF files are identified as such
by the first three letters of the file being GIF, and that the
version of GIF file is identified by the next 3. With that
in mind, I came up with this addition to /etc/magic:

0	string		GIF		GIF image
>3	byte&0x7f	x		(version %c
>4	byte&0x7f	x		%c
>5	byte&0x7f	x		%c)

Not only is this a little on the cumbersome side, it
results in:

foo.gif		GIF image (version 8 7 a)

What I REALLY want is:

0	string		GIF		GIF image
>3	string		xxx		(version %s)

but that doesn't work, obviously. Any ideas?

-- 
Nick Sayer               |  "Disclaimer? I don't think so!  | RIP: Mel Blanc
mrapple at quack.sac.ca.us  |   Homey don't play dat."         |   1908-1989
N6QQQ  [44.2.1.17]       |                                  |  May he never
209-952-5347 (Telebit)   |                --Homey the Clown |  be silenced.



More information about the Comp.unix.admin mailing list