[oclug] Re: $HOME vs $Home
Stephen M. Webb
stephenw at xandros.com
Fri Aug 4 13:07:27 EDT 2006
On 04/08/06 12:43, Jamon Camisso wrote:
>
> Finally, I'll pose the question again: Is there a comprehensive way to
> list all initialized bash variables on a system? A table or some such
> thing. At this point I'm sticking with tab completion since it is what I
> learned, is more than fast enough, and is always correct.
The command 'env' will list all initialized shell variables in both bash and
the standard shell. The command 'set' will list all initialized shell
variables in bash, csh, DOS, and COMMAND.COM.
There is no known command to list uninitialized variables, since that list is
infinite.
If you issue the command "set -u" you will get barf if you try to reference an
uninitialized shell variable. A shell variable initialized to an empty
string is not the same thing as an uninitialized shell variable.
--smw
More information about the OCLUG
mailing list