My question was it is possible to use environment variables in printcap?
My reason for doing this was because I'm currently migrating my data to
a new disk set. It would be convenient to just have to change one
variable instead of 40 printcap entries. However it appears it that
editing printcap would be the easiest solution.
Many thanks to all who replied especially Jim Belonis and Jon Buchanan.
Most replies suggested using the PRINTER environment variable define the
preferred printer to be used as default for printing, instead of using
the alias lp in the printcap file.
Jon Buchanan suggested :-
Don't think you can use environment variables in the printcap file,
sorry. The nearest workaround might be with symbolic links maybe?
Jim Belonis wrote:-
Whose environment variables would you want to be used ? the printcap file
is read by the lpd daemon in the context of 'root'. If that is in fact
what you want, then you can simulate this by
rewriting the printcap file every time you change that environment
variable (instead of or in addition to changing that environment
variable). Or you can rewrite lpd to do what you want (public-domain
lpd's are available as source code).
Once again, many thanks to all who responded.
Michael Long.
Karmax Heavy Stamping.
Mlong_at_karmax.com
Received on Wed Nov 15 1995 - 15:38:55 NZDT