Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 14 lines (11 sloc) 0.371 kb
#!/bin/bash
if [ -f /var/log/uptime.log ]; then
uptime=`tail -1 /var/log/uptime.log | awk '{print $3}' | sed 's/,$//'`
IFS=: read -r h m <<< "$uptime"
echo "${h}h ${m}m"
else
echo "Please Reboot!"
fi
#TODO:
# - Add command line parsing to display last X uptime logs, use getopt to parse
# - Add option to genrate graph, probable command line option -g
Jump to Line
Something went wrong with that request. Please try again.