On Tue, 25 Apr 2000, Dee Pettiford wrote:

> Basically, what I need to do is 
> write a script to determine the number of users logged on a server and print
> it within a message to the screen.

There is already one:

    zenon% uptime
      4:05pm  up 6 day(s), 16:25,  10 users,  load average: 2.34, 2.29, 2.25

Now to extract the number of users, a little scripting might be necessary,
but this should fairly trivial to write in either sed/awk, or perl.

> I also need to have the UNIX date utility run automatically once every hour
> every day and have it sent to my email using the Cron utility.

Add an entry to your crontab that simply executes date.  If an entry from
crontab produces any output in standard output, then cron will send the
output with mail to the crontab owner.

- giorgos

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to