[olug] am I at the console?
Dave Weis
djweis at internetsolver.com
Sat Mar 25 00:58:51 UTC 2006
run 'tty', if it's /dev/pts/ it's remote, if it's /dev/ttyS* it serial,
otherwise it's probably local.
On Fri, 24 Mar 2006, thelarsons3 at cox.net wrote:
> Hello,
>
> I want a shell script to check if it's being run at the console, so it can act differently than it would in a virtual/remote terminal. Is this possible? A portable (cross-Unix) solution would be great, but I'll take anything.
>
> Thanks,
> Tim
>
>
--
Dave Weis
djweis at internetsolver.com
http://www.internetsolver.com/
More information about the OLUG
mailing list