initial commit
This commit is contained in:
30
chapter25/print_UP_HP-UX.ksh
Executable file
30
chapter25/print_UP_HP-UX.ksh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# SCRIPT: print_UP_HP-UX.ksh
|
||||
#
|
||||
# AUTHOR: Randy Michael
|
||||
# DATE: 03/14/2007
|
||||
# REV: 1.1.P
|
||||
#
|
||||
# PLATFORM: HP-UX Only
|
||||
#
|
||||
# PURPOSE: This script is used to enable printing and queuing separately
|
||||
# on each print queue on an HP-UX system.
|
||||
#
|
||||
# REV LIST:
|
||||
#
|
||||
# set -x # Uncomment to debug this script
|
||||
# set -n # Uncomment to check syntax without any execution
|
||||
|
||||
lpstat | grep Warning: | while read LINE
|
||||
do
|
||||
if (echo $LINE | grep 'is down') > /dev/null
|
||||
then
|
||||
enable $(echo $LINE | awk '{print $3}')
|
||||
fi
|
||||
|
||||
if (echo $LINE | grep 'queue is turned off') >/dev/null
|
||||
then
|
||||
accept $(echo $LINE | awk '{print $3}')
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user