mars-nwe/opt/prn

20 lines
322 B
Plaintext
Raw Normal View History

2011-11-14 19:58:21 +01:00
#!/bin/sh
# print using lpr nad lp printer when writing
# return spool and printer status when reading
#
PRINTER=lp
case "$1" in
WRITE)
/usr/bin/lpr -P $PRINTER -
;;
READ)
CR=`echo -n -e '\r'`
/usr/sbin/lpc status $PRINTER | sed "s/$/$CR/g"
/usr/bin/lpq -l -P $PRINTER | sed "s/$/$CR/g"
;;
*)
;;
esac