Here’s a simple shell script that outputs the system uptime, handy for use with the XFCE Generic Monitor plugin:
#!/bin/bash
upsecs="$(cat /proc/uptime | cut -d ' ' -f 1 | cut -d '.' -f 1)"
mins=$((upsecs/60%60))
hours=$((upsecs/60/60%24))
days=$((upsecs/60/60/24))
echo "${days}d ${hours}h ${mins}m"
I did it because I wasn’t pleased with the system load plugin displaying my uptime on two lines—that messed up my panel size. And also, another go at shell scripting, for the fun of it.

