The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 07-15-2004
ohhmyhead ohhmyhead is offline
Registered User
  
 

Join Date: Jul 2004
Posts: 5
my cat does have -u but it's doin some odd things here. really doesn't change the way anything looks.

"top -l4 -s1" posts 1 sample a second.

"top -l4 -s1 | cat -u" posts 2 samples every 2 seconds.

"top -l4 -s1 | awk -f myfile" still posts 2 samples every 2 seconds.

oddly enough, adding cat -u to the end of my command causes it to wait until all of the samples have gone through before it posts anything. so "top -l4 -s1 | awk -f myfile | cat -u" waits four seconds and then posts all four samples at once.

it's interesting to see these differences. a little frustrating too, but interesting. =) could this be some buffering in the pipe?