[ILUG] bash script Q

Justin MacCarthy macarthy at iol.ie
Mon Apr 8 11:36:35 IST 2002


Thanks for all those would responded, plenty of advice there...

The reason I wanted a bash, script was just for a very quick and nasty
solution to check the files the 'file *' solution work very nicely, and on a
closer look it lead me to the 'magic' file, which had a good description of
what defines what a good postscript header looks like. As it happens, in the
long run I'll write something in Java, as it's for a web based app. and has
a java element anyway.
Below is the definition in the magic file... man file will give you the
knowledge to read it.

Thanks all

Justin

# PostScript, updated by Daniel Quinlan (quinlan at yggdrasil.com)
0	string		%!		PostScript document text
>2	string		PS-Adobe-	conforming
>>11	string		>\0		at level %.3s
>>>15	string		EPS		- type %s
>>>15	string		Query		- type %s
>>>15	string		ExitServer	- type %s
# Some PCs have the annoying habit of adding a ^D as a document separator
0	string		\004%!		PostScript document text
>3	string		PS-Adobe-	conforming
>>12	string		>\0		at level %.3s
>>>16	string		EPS		- type %s
>>>16	string		Query		- type %s
>>>16	string		ExitServer	- type %s
0	string		\033%-12345X%!PS	PostScript document









More information about the ILUG mailing list