Needless to say, I wrote the script anyway. Im sure I can pilfer bits and pieces of it for another quick script later.
#!/bin/bash
### Removes Print jobs from the print queue
### Command:
#Query printer for print queue, then drop data to jobid file
lpq -P $1 awk '{print $3}' > jobid
# remove all print jobs from specified printer
cat jobid xargs lprm
# Query printer queue again and let admin know that the jobs have been removed
lpq -P $1
echo 'Print jobs removed'
# remove temp file
rm -rf jobid
No comments:
Post a Comment