1
1
This command nstats gives me output like below. How can I use awk or grep to give me the uptime with only days on it? I cannot use the "" to get the output.
HOSTNAME LOAD MEMORY SWAP PROCS TIME UPTIME
Server 0.01 9% 3% 54 10:39 22 days 10:16:03
The OP's nstats output was actually two lines of text, not one. – Kenster – 2014-09-18T16:00:28.210
What do you mean two lines? I see just one line. – unlink – 2014-09-18T16:04:47.027
It's two lines in the markdown for the question (the actual text entered by the user), but it was being line-wrapped. The question has been edited to format the text correctly. – Kenster – 2014-09-18T16:10:28.883
Yes, I see it now.. I edited my response accordingly. – unlink – 2014-09-18T16:53:31.997
That egrep answer is a nice one, here... I didn't know about
-o
; very useful! – lindes-hw – 2014-09-19T01:07:43.303