[cups.general] flushing a queue

TPanaitescu at colorcon.com TPanaitescu at colorcon.com
Wed Dec 15 09:34:15 PST 2004


---------------------- Cut here --------------------------
#!/bin/sh
# Save this as flushq.sh, change perms to +x
# Usage: flushq.sh <printer_name>

if [ $# -lt 1 ]; then
     echo "Usage: flushq.sh <printer_name>"
     exit 1
fi

for i in `lpstat -o|grep $1|awk '{print $1}'`;do
  cancel $i
done
------------------------ Cut here ------------------------




Gene Heskett <gene.heskett at verizon.net> 
12/15/04 12:21 PM
Please respond to
gene.heskett at verizon.net


To
cups at easysw.com
cc
TPanaitescu at colorcon.com
Subject
Re: [cups.general] flushing a queue






On Wednesday 15 December 2004 09:57, TPanaitescu at colorcon.com wrote:
>for i in `lpstat -o|grep <printername>|awk '{print $1}'`; do cancel
> $i; done
>
>from the command line.
>
Could this be put in a /usr/sbin script using <$1> in place of the
 <printername> above?

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.30% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cups.org/pipermail/cups/attachments/20041215/2d21f9b8/attachment-0001.html>


More information about the cups mailing list