Sync usage with man page.
[netbsd-mini2440.git] / dist / smbfs / examples / print / lj6l
blob578611a32f2bd056a15095a26462d7099d565116
1 #!/bin/sh
3 # Sample input filter to print on HP Laser Jet printers
4 # Installed in /usr/local/libexec/hp6l
6 DEVICE="ljet3"
7 PAPERSIZE="a4"
9 printf "\033&k2G" || exit 2
11 read first_line
12 first_two_chars=`expr "$first_line" : '\(..\)'`
14 if [ "$first_two_chars" = "%!" ]; then
15 exec 3>&1 1>&2
16 /usr/local/bin/gs -sPAPERSIZE=${PAPERSIZE} -dSAFER -dNOPAUSE -q -sDEVICE=${DEVICE} \
17 -sOutputFile=/dev/fd/3 - && exit 0
18 else
19 echo $first_line && cat && printf "\033&l0H" && exit 0
22 exit 2