#!/bin/bash

### motd.sh
### Displays some info about the system.
### Created by Charles Auer
### Tested 4/07/2011
### Updated 4/07/2011

echo -e "
 System Information as of $(/bin/date)

 Hostname:      $(/bin/hostname)
 Load Average:  $(/bin/cat /proc/loadavg | /usr/bin/cut -d " " -f 1)
 Processes:     $(/bin/ps aux | /usr/bin/wc -l)
 Memory Free:   $(/usr/bin/free -m | /bin/grep - | /usr/bin/awk '{ print $4 }')MB
 IP Address:    $(/sbin/ifconfig eth0 | /bin/grep "inet addr" | /usr/bin/cut -d ":" -f 2 | /usr/bin/  cut -d " " -f 1)
 Uptime:        $(/usr/bin/uptime | /bin/sed 's/.*up \([^,]*\), .*/\1/')

 $(/usr/lib/update-notifier/apt_check.py --human-readable | grep updated)
 $(/usr/lib/update-notifier/apt_check.py --human-readable | grep security)
"