HOSTNAME: environment variable or not?

Henry Spencer henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Fri Feb 18 17:56:13 UTC 2005


On Fri, 18 Feb 2005, Merv Curley wrote:
> > Try "set | less".  That's how you list *all* variables, exported or not.
> 
> I've never seen that before.  Exactly what is being displayed?  Is only the 
> first section useful or does the sections of code for each program signify 
> anything useful?

The "sections of code" are shell functions, essentially shell scripts
pre-read by the shell (usually from .profile or various equivalents
thereof) to speed them up.  This is the right way to do "aliases" -- the
separate alias mechanism in bash is basically for backward compatibility
with historical mistakes.

They're sort-of-kind-of variables containing shell code rather than text
values, which is why they show up in "set" output.

                                                          Henry Spencer
                                                       henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list