Author: Jacob Nielsen
Date: 09-09-00 17:38
This is a simple script of how to paste users in this format:
no,username,realname,login
---
#!/bin/sh
echo -e "
`uptime`
`awk -F: '{print NR, $1, "[" $5 "]", $7 }' /etc/passwd`"
---
And another script for sending the above information to an email address:
--
#!/bin/sh
echo -e "
`uptime`
`awk -F: '{print NR, $1, "[" $5 "]", $7 }' /etc/passwd`" |mail -s "Use rs on `hostname`" someone@domain.com
echo "Ok, mail has been delivered..."
--
Hope its usable for someone, cause it is is for me :)
Cheers
Jacob Nielsen
|
|