kprinter to remove file after printing

Michael Goffioul kde-print@mail.kde.org
Fri, 07 Mar 2003 14:28:55 +0100


> So then perhaps
> 
> #!/bin/sh
> cat $1 | kprinter
> rm -f $1
> 
> is the better as kprinter would for sure read STDIN up to the end before
> it exits.

This can work, as in that situation, the input is first read to
a temporary file, whose removal is controlled by the KDEPrint daemon.
So when kprinter exits, it doesn't care about the original file, it
only uses the generated temp file.

Michael.

-- 
------------------------------------------------------------------
Michael Goffioul		IMEC-DESICS-MIRA
e-mail: goffioul@imec.be	(Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510		Kapeldreef, 75
Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
------------------------------------------------------------------
This e-mail and/or its attachments may contain confidential
information.  It is intended solely for the intended addressee(s). 
Any use of the information contained herein by other persons is
prohibited.  IMEC vzw does not accept any liability for the contents
of this e-mail and/or its attachments.
------------------------------------------------------------------