RE: pr and lpr combination command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-----Original Message-----
From: Alfred Hovdestad [mailto:alfred.hovdestad@xxxxxxxx]
Sent: Tuesday, September 20, 2005 6:00 PM
To: General Red Hat Linux discussion list
Subject: Re: pr and lpr combination command


#!/bin/sh
pr $1 | lpr



Han Tin wrote:
> To all,
> I am new to Linux (RH) and I am trying to print my programs using pr.
> Anyone out there has script written for that. 
> I have posted, no response. 
> Thanks in advance.
> Han
> Haddon House Foods Products, Inc.
> Medford, NJ.
> 

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux