I guess I'm missing something...
why a script for something is yet done by the uptime bash command?
i tried the script and it outputs this:
in NerdTool i use the uptime command:
whitch outputs:
why to prefer using a more expensive script?
why a script for something is yet done by the uptime bash command?
i tried the script and it outputs this:
Code:
2 days, 14 hrs, 30 mins
Code:
uptime | awk '{sub(/[0-9]|user\,|users\,|load/, "", $6); sub(/mins,|min,/, "min", $6); sub(/user\,|users\,/, "", $5); sub(",", "min", $5); sub(":", "h ", $5); sub(/[0-9]/, "", $4); sub(/day,/, " day ", $4); sub(/days,/, " days ", $4); sub(/mins,|min,/, "min", $4); sub("hrs,", "h", $4); sub(":", "h ", $3); sub(",", "min", $3); print $3$4$5$6}'
Code:
2 days 14h 33min