[Techtalk] Script to determine if logged in
Meryll Larkin
alwanza at oz.net
Thu May 19 01:11:38 EST 2005
Use "w" to find who is logged in and what they are doing
With cron you don't need to be logged in to get the message if you have the
command output emailed to yourself or messaged in some other way outside the
system.
Put it together with either a Perl script or shell plus awk (maybe plus
sed).
Meryll
-----Original Message-----
From: techtalk-bounces at linuxchix.org [mailto:techtalk-bounces at linuxchix.org]
On Behalf Of Dan
Sent: Wednesday, May 18, 2005 3:35 AM
To: Techtalk
Subject: [Techtalk] Script to determine if logged in
I'm trying to write a cron job to determine if I'm logged in. There are
several kludges that I could use, but does anyone know of a good way?
As a variant, is there a good way to determine if ANYONE is logged in,
or logged into X Windows?
Such a script is possible but not easy to test, because part of testing
it requires, er, running the program without being logged in.
--
The characters Bert and Ernie on Sesame Street were named after
Bert the cop and Ernie the taxi driver in Frank Capra's "It's A
Wonderful Life"
_______________________________________________
Techtalk mailing list
Techtalk at linuxchix.org
http://linuxchix.org/cgi-bin/mailman/listinfo/techtalk
More information about the Techtalk
mailing list