[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a 'who called me?' variable?



In article <[🔎] 200107191551.f6JFpfe19191629@mail1.ats.rochester.edu>, Dan 
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.

The tty command might help a bit (it says what port you are connected to).
$TERM will tell you what kind of terminal Linux thinks you have.

-- 
Nikki Locke, Trumphurst Ltd.      PC & Unix consultancy & programming
nikki@trumphurst.com            http://www.trumphurst.com/




Reply to: