Operating System - HP-UX
1829147 Members
2653 Online
109986 Solutions
New Discussion

Defining Command line options for Printing

 
SOLVED
Go to solution
rmueller58
Valued Contributor

Defining Command line options for Printing

I am wandering anyone knows if there is a way to define the printer options in the users environment..

I am using the
export LPDEST= in the .profile

We want to default in the LP command options of
-oc -ovsi7.27..

Anyone that may have an idea about defining the command options in the .profile I would appreciate it..
7 REPLIES 7
V. V. Ravi Kumar_1
Respected Contributor
Solution

Re: Defining Command line options for Printing

hi,

use alias in the .profile
alias lp="lp -oc"

when u say lp it takes all the options in the alias

regds
Never Say No
rmueller58
Valued Contributor

Re: Defining Command line options for Printing

Ravi .. I get the following error when logging in as user..


lp alias not found
${HOME:-.}/.profile[31]: =lp -oc -ovsi7.27: invalid alias name
mabresna:
V. V. Ravi Kumar_1
Respected Contributor

Re: Defining Command line options for Printing

hi,

have u used " " marks
try again
regds
Never Say No
V. V. Ravi Kumar_1
Respected Contributor

Re: Defining Command line options for Printing

again,

there should not be any space before or after =
alias lp="lp -oc"

regds
Never Say No
rmueller58
Valued Contributor

Re: Defining Command line options for Printing

That did it.. Thanks again Ravi.. You saved me again!!

rmueller58
Valued Contributor

Re: Defining Command line options for Printing

I had to correct some syntax,

the way I made it work was as follows:


export DEST=esucoohphplj
export arg1=-oc
export arg2=-ovsi7.27
export LPDEST=$DEST" "$arg1" "$arg2
rmueller58
Valued Contributor

Re: Defining Command line options for Printing

Syntax that does work:

export DEST=esucoohphplj
export arg1=-oc
export arg2=-ovsi7.27
export LPDEST=$DEST" "$arg1" "$arg2