home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.misc
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!caen!batcomputer!munnari.oz.au!metro!usage!news
- From: cameron@cs.unsw.oz.au
- Subject: Re: post script to text
- Message-ID: <cameron-930126162817-1-12394@fuligin>
- To: sljn6@cc.usu.edu
- Sender: news@usage.csd.unsw.OZ.AU
- Nntp-Posting-Host: fuligin.spectrum.cs.unsw.oz.au
- Reply-To: cameron@cs.unsw.oz.au
- Organization: CS&E Computing Facility, Uni Of NSW, Oz
- References: <1993Jan24.171940.63123@cc.usu.edu>
- Errors-To: cameron@cs.unsw.oz.au
- Date: Tue, 26 Jan 1993 05:28:43 GMT
- Return-Receipt-To: cameron@cs.unsw.oz.au
- Lines: 32
-
- | I wanted to know if there is any freely available
- | software to change post script file to txtt
-
- I append a quick hack I have used with some success. It produces rudamentry
- text output amenable to further formatting.
- - Cameron Simpson
- cameron@cse.unsw.edu.au, DoD#743
- --
- Theorectial Physicist,N.:A physicist whose existence is postulated, to make
- the numbers balance but who is never actually observed in the laboratory.
-
- #!/bin/sh
- #
- # Cut here and feed through /bin/sh to extract unps.
- #
-
- sed 's/^X//' > unps <<'EOF-//fuligin/1/cameron/bin/unps'
- X#!/bin/sh
- X#
- X# Like strings(1) for PostScript.
- X# - Cameron Simpson, 21nov92
- X#
- X
- Xsed -e '/([^()]*)/!d
- X s/[^()]*(//
- X s/)[^()]*(/\
- X/g
- X s/)[^()]*$//
- X /^$/d' ${1+"$@"} | fmt
- EOF-//fuligin/1/cameron/bin/unps
-
- exit 0
-