l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 May 12 18:40

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] printing manpages and really temporary variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] printing manpages and really temporary variables

a few months ago i stumbled on something useful.  maybe other people
will find it useful too.

often i want to print manpages in very small font.  using enscript -f
Courier7, usually.

but doing so is a paper waster unless you start resizing the xterm since
by default, you'll get 80 characters per column.  to get the full width
of my printer, i use:

COLUMNS=120 man latex2rtf | enscript -f Courier7 -o /tmp/blah;  gv /tmp

i just learned about the first part of this recently.  apparently, when
you say:

   $ VAR=value program

VAR contains the value "value" until bash prints the next command line
prompt (i don't know how else to say this).  like this:

   $ VAR=value program    # VAR=value while program runs
   $                      # VAR no longer equals value

it's especially nice for using with, say, dpkg because doing this
doesn't upset the real value of COLUMNS.  for instance:

p@satan$ dpkg -l "tetex-base"
ii  tetex-base     1.0.2+20011202 basic teTeX library files

p@satan$ COLUMNS=100 dpkg -l "tetex-base"
ii  tetex-base          1.0.2+20011202-3    basic teTeX library files

p@satan$ dpkg -l "tetex-base"
ii  tetex-base     1.0.2+20011202 basic teTeX library files

the last one illustrates that COLUMNS is no longer equal to 100.  of
course, you could always resize the xterm to re-establish the value of
COLUMNS, but this way you don't have to.

anyway, i found this to be very useful...


GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!