Guessing environment variables set origin
Markus Hitter
mah at jump-ing.de
Sat Sep 12 07:27:18 UTC 2009
Am 11.09.2009 um 16:02 schrieb Yguaratã C. Cavalcanti:
> is there any way to guess if a environment variable was set by
> system of if
> it was defined by the configuration files?
Well, where exactly do you draw the line between "system" and
"configuration file"? Ubuntu, as installed from scratch, comes with
quite a few configuration files and /etc/profile is usually
considered as one of them.
> I imagined that i could to this by parsing some files such as /etc/
> profile
> or ~/profile, for example. However it would require a complete bash
> script
> parser, i guess.
As you can start another shell in a shell, use bash it's self to
interpret it's environment:
$ bash env
Bash does distinguish a few modes it can run in: "login shell", "ksh
emulation", etc. See the man page for more.
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
More information about the Ubuntu-devel-discuss
mailing list