Hello,

I'm looking at the magic(5) man page, and I'm still all sorts of lost while
creating the start of a simple magic definition.  I'll need to eventually
run this on FreeBSD, and such I'm using my ibook since the man pages appear
identical.  It might work the same in Linux, but I'm not testing that yet.

I'm essentially trying to look within the first 1-2kb with the file(1)
command, supply my own additional magic file, and see if the text "quick
brown fox" (as an example) is present.

I'm almost ready to cheat and use this instead:

zcat file.txt | head -c 2048 | tail -c 1024 | grep -o "quick brown fox"

I'm tinkering with file magic first just to see. I've thought of using this
approach no few times in the past but chicken out with a script etc.

Regards,


Scott.

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to