From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075325006635.tru64-unix-managers.marc@archive.invalid> From: "Long, Michael" Date: Wed, 15 Nov 1995 14:10:00 +0000 To: tru64-unix-managers Subject: [S] Using environment variables in printcap X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075325006635 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@karmax.com