Re: a 'who called me?' variable?
On Thu, Jul 19, 2001 at 11:51:06AM -0400, Daniel Patrick Berdine wrote:
| Is there an environment variable in bash that can be used to tell where
| bash is running from? For example, is there a variable I can test in
| my .bashrc to tell whether I am running remotly, from a tty, from
| konsole, an xterm, etc.? I'v looked at the Advanced Scripting HOWTO,
| but the only thing that looked promising was "$BASH_ENV" which seems to
| be empty.
Based on your examples there, $TERM might be helpful. For example in
my .cshrc on the school's Solaris box I have
if ( "$TERM" == "linux" )
bash && exit
end
so when I login from my linux box (console) I automatically get bash
and I don't have to exit csh after I exit from bash.
-D
Reply to: