Re: How to tell if I'm logged on from console?
Here's a little snippit I've used...
----------
case $(tty) in
/dev/tty[1-9]) setleds +num;;
esac
----------
Probably overkill using a case statement for no more than that, but it
works.
On Tue, May 26, 1998 at 02:45:51AM -0400, Norbert Veber wrote:
> On Wed, May 13, 1998 at 06:58:45AM -0400, Kenneth Sims wrote:
> > Will,
> >
> > I think Mr. Moffatt is on the right track. Won't `tty` actually be ttyp# if
> > you are connected via ethernet? Similarly, I think it will be different when
> > you are connected via serial port.
> >
> > I've used: x = `tty | grep 'tty[012345]'` to do exactly what you are
> > asking about.
>
> I've been trying to setup my dad's account to do just that, but since I know
> nothing of bash programming, could someone post an actual (and short) script
> to do this?
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: