Article View: comp.lang.postscript
Article #5008Re: How can I tell if a file is "postscript"
From: Nesser
Date: Wed, 13 Mar 1991 22:05
Date: Wed, 13 Mar 1991 22:05
46 lines
2051 bytes
2051 bytes
Does anyone have a program that can tell if a file is not postscript
and put it in postscript(assuming the original file was ascii). If not
is just checking for %! good enough to ensure a postscript file?
thanks.
Rob Montjoy - Rob.Montjoy@UC.Edu
Computer Engineer - montjoy@ucbeh.BITNET
University of Cincinnati - montjoy@babbage.ece.uc.edu
Electrical and Computer Enginering - uunet!uceng!rmontjoy
I have just plowed through about 30 messages about the PS format etc, yet
no one has attempted to answer the question or at least posted anything.
So here is a bit of an answer, it may not be completely correct but it
works for me (so far).
To translate some text to ps there are a good number of PD things that you
can get from uunet.uu.net in the comp.sources.{misc,unix} archives or you
can buy the transcript software(I don't remember who makes it off hand but
I could dig it up). Here is a bit of a shell hack which has always been
able to distinguish(sp?) .ps files for me:
set PS = `grep -n "%\\!" $k | awk '{print substr($1,1,4)}'`
if ($PS =~ "1:%\!") then
set POSTSCRIPT = "yes"
else
set POSTSCRIPT = "no"
endif
and if anyone see something that will cause it to break please let me know.
---> Phil
--
---> Philip J. Nesser
Member of the Technical Staff
The MITRE Corporation
ARPA: pjnesser@mbunix.mitre.org
UUCP: ...!mit-eddie!pjnesser
Technical Details
Message-ID:
<PJNESSER.91Mar13140500@mbunix.mitre.org>Path:
arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!apple!agate!linus!linus!mbunix!pjnesserReferences:
<7647@uceng.UC.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!apple!agate!linus!linus!mbunix!pjnesser From: pjnesser@mbunix.mitre.org (Nesser) Newsgroups: comp.lang.postscript Subject: Re: How can I tell if a file is "postscript" Message-ID: <PJNESSER.91Mar13140500@mbunix.mitre.org> Date: 13 Mar 91 22:05:00 GMT References: <7647@uceng.UC.EDU> Sender: news@linus.mitre.org (News Service) Organization: The Mitre Corp., Bedford, MA. Lines: 46 In-Reply-To: rmontjoy@uceng.UC.EDU's message of 3 Mar 91 22:26:25 GMT Nntp-Posting-Host: mbunix.mitre.org