function HP_UX_printing { 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 }