diff options
Diffstat (limited to 'modules/uptime')
-rwxr-xr-x | modules/uptime | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/uptime b/modules/uptime new file mode 100755 index 0000000..2c771d4 --- /dev/null +++ b/modules/uptime @@ -0,0 +1,13 @@ +#!/bin/bash + +# Prints the total ram and used ram in Mb + +PREFIX='' + +get_uptime() +{ + UPTIME=$(uptime | sed 's/.*up \([^,]*\), .*/\1/') + echo "$PREFIX$UPTIME" +} + +get_uptime |