All, I want to extract values from top for plotting purposes. I'm currently using the following command
top -l 0 -s 1 -pid 12345 -stats rsize | awk 'NR%13==0'
When I run this , I get the expected output. But when I try to redirect the output to a file by running the following:
top -l 0 -s 1 -pid 299 -stats rsize | awk 'NR%13==0' > output.txt
it doesn't work. What should I do to redirect the output to a file?
I'm on a Mac OSX(Lion)