man lpr -P destination Prints files to the named printer. Alfred Han Tin wrote:
Hi Alfred, This is the shell scripts, I used in HP-UX. #!/usr/bin/ksh # file : proglist # desc : pr formatting and hp laser portrait condense code # by : Han Tin # usage: proglist <file1> ... <filen> | lp -d <printer> # usage: <program> | proglist | lp -d <printer> # ex. : proglist `pwd`/file1 `pwd`/file2 | lp -d mis_laser # : ls -al | proglist | lp -d mis_laser #--------------------------------------------------------------------- echo "^[&k2S^[&l5C\c" ( if [ "$#" -eq 0 ] then cat | pr -n -o20 -w100 -l98 -f $1 else pr -n -o20 -w100 -l98 -f "$@" fi ) | crlf usage: proglist <file1> ... <filen> | lp -d <printer> According to yours, I create a file called prt. #!/bin/sh # prt pr -n -o20 -w100 -l98 -f $1 | lpr -d picshp It gave me the following message. What need to be done. Your help is appreciated in advance. $ prt prt|lp -dpicshp Warning - Cannot open file 'picshp', No such file or directory picshp: nothing to print
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list