Wednesday, September 6, 2017

uptime periodic print

while(true); do uptime | sed -E 's/\s*up\s*([0-9]* day[s]*,\s*[0-9]*:[0-9]*|[0-9]*:[0-9]*),\s*[0-9]* user[s]*,\s*load average:\s/, /'; sleep 3; done




while(true); do uptime | cut -d':' -f4; sleep 3; done

No comments: