home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / ghostscr / bug / 1238 < prev    next >
Encoding:
Text File  |  1992-11-24  |  1.5 KB  |  53 lines

  1. Newsgroups: gnu.ghostscript.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!irfu.SE!bt
  3. From: bt@irfu.SE (Bo Thide')
  4. Subject: Summary: Can ghostscript be used as a simple UNIX filter?
  5. Message-ID: <1992Nov23.131933.24375@irfu.se>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Swedish Institute of Space Physics, Uppsala, Sweden
  8. Distribution: gnu
  9. Date: Mon, 23 Nov 1992 13:19:33 GMT
  10. Approved: bug-ghostscript@prep.ai.mit.edu
  11. Lines: 40
  12.  
  13. Thanks to all who replied:
  14. David Jackson <mbhepdj@meehpa.ee.man.ac.uk>
  15. ndiaye@cs.uni-sb.de (Alassane Ndiaye)
  16. Wolfgang STEGER <sw@diabas.tuwien.ac.at>
  17.  
  18.  
  19. The solution I've chosen for the moment is a slight variation
  20. of a script by David Jackson:
  21.  
  22.  
  23. #!/bin/sh
  24. if test $# = 0
  25.         then
  26.                 filename="-"
  27.         else
  28.                 filename=$1
  29. fi
  30.  
  31. /usr/local/bin/gs -q -dNOPAUSE -sDEVICE=laserjet -r300 \
  32. -sOutputFile=\|"/bin/cat" $filename /usr/local/lib/ghostscript/quit.ps
  33.  
  34. exit
  35.  
  36. where /usr/local/lib/ghostscript/quit.ps contains the single word 'quit'.
  37.  
  38.  
  39. As an alternative, Wolfgang Steger suggests file redirection:
  40.  
  41. gs [gs options] -sOUTPUTFILE='cat >&3' files ... 3>&1  2>logfile 1>&2
  42.  
  43.  
  44. Bo
  45. -- 
  46.    ^   Bo Thide'----------------------------------------------Science Director
  47.   |I|        Swedish Institute of Space Physics, S-755 91 Uppsala, Sweden
  48.   |R|    Phone: (+46) 18-303671.  Fax: (+46) 18-403100.  IP: 130.238.30.23
  49.  /|F|\          INTERNET: bt@irfu.se      UUCP: ...!mcvax!sunic!irfu!bt  
  50.  ~~U~~ ----------------------------------------------------------------sm5dfw-
  51.  
  52.  
  53.