>For CPU use it’s a bit trickier. For some reason top -l 1 prints an inaccurate reading. But oddly enough, if you use top -l 2 you get two readings, and the second one is accurate! I still had to bash my head against this for a while to figure out how to only print the second line.
>For CPU use it’s a bit trickier. For some reason top -l 1 prints an inaccurate reading. But oddly enough, if you use top -l 2 you get two readings, and the second one is accurate! I still had to bash my head against this for a while to figure out how to only print the second line.
tail -1
(or tail -n 1)