[oclug] Starting an X Windows term
Joe Burpee
jeb at burkby.com
Thu Aug 30 08:37:27 EDT 2001
On 01/08/29 21:52:27, Gilles J. Seguin wrote:
> my fault, sorry, the lines were supposed to be
> ~/.bashrc by default is source ... interactive, means -norc
> ~/.bashrc is not source ... login
No problem Gilles. Reminds me of something else. It finally came back
to me why I thought $0 was better than $SHLVL:
$ su -
Password:
# echo $SHLVL $0
1 -bash
# exec bash
# echo $SHLVL $0
1 bash
No surprise. They're different, but consistent. I think I would
usually want the test [ "${0##-*}" ] for example, instead of
[ "$SHLVL" -gt 1 ].
I ran into this when trying to fix a problem in the X scripts. I soon
realized that neither of the tests was very useful in that situation.
And it eventually turned out to be a "interactive" problem, not a
"login" one. Trying to separate these two factors can cause brain
damage. ;-)
Joe
More information about the OCLUG
mailing list