Return-Path: owner-linux-activists@Niksula.hut.fi
Received: from joker.cs.hut.fi (root@joker.cs.hut.fi [130.233.40.32]) by keos.Helsinki.FI (8.6.9/H46) with SMTP id PAA27465 for <wirzeniu@cs.Helsinki.FI>; Wed, 2 Nov 1994 15:46:37 +0200
Received: from joker.cs.hut.fi by niksula.hut.fi id <57074-3>; Wed, 2 Nov 1994 11:58:46 +0200
From: "Linux Activists" <linux-activists@Niksula.hut.fi>
To: "Linux-Activists" <linux-activists@Niksula.hut.fi>
Reply-To: "Linux-Activists" <linux-activists@Niksula.hut.fi>
X-Note1: Remember to put 'X-Mn-Key: DOC' to your mail body or header
Subject: Linux-Activists - DOC Channel digest. 94-10-2-7:24
X-Mn-Key: DOC
Sender: owner-linux-activists@Niksula.hut.fi
Message-Id: <94Nov2.115846eet.57074-3@niksula.hut.fi>
Date: Wed, 2 Nov 1994 11:58:43 +0200
Content-Length: 1527
Status: RO
X-Status: 


Topics:
	 Re: <none>


----------------------------------------------------------------------

From: hpa@ahab.eecs.nwu.edu (H. Peter Anvin)
Subject: Re: <none>
Date: 2 Nov 1994 07:18:54 GMT


Followup to:  <94Nov1.180327eet.59357-1.1@niksula.hut.fi>
By author:    Hirac Kasapoglu <hirac@topkapi.cc.itu.edu.tr>
In newsgroup: linux.act.doc
>
> Hello,
> I have a problem with ghostscript. I'm not sure where should I ask for 
> it. I think people who interested in writing tex files, converting them 
> to postscript files, may know about it or who should I ask for it. 
> 
> My problem is: I want to convert manpages from ps to lj format. I use 
> this script to do that. 
> 
> gs -sDEVICE=laserjet -sOutputFile=$1.lj -sPAPERSIZE=a4 -dNOPAUSE -q $1.ps
> 
> It is ok. It works but I have to enter quit command or press ctrl-D key 
> to quit the GS prompt. I can do it for several times. But it is very hard 
> to it for several thousand times. Because I want to do it for all man 
> pages. How can I force GS to quit immediatly after finishing its job. 
> 
> Thanks in advance. 
> 

Try using:

gs -sDEVICE=laserjet -sPAPERSIZE=a4 -dNOPAUSE -dSAFER -q
-sOutputFile=- - < $1.ps > $1.lj

(all on one line, of course).

Using gs as a filter disables its interactive features.  I use this
command line (or the equivalent) when I call gs from my magic printer
filter (to be released as soon as I can find time to write a README or
man page for it.)

	/hpa


------------------------------

End of DOC Digest
*****************
-------
