Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'View valid 'top' output on the desktop via GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View valid 'top' output on the desktop via GeekTool
Authored by: hysterion on Aug 09, '06 09:03:09PM
> "Now do an "od -a /tmp/foo" and notice the file is filled with nul bytes."

Not on my machine:


$ sh -c 'while :; do echo hello; sleep 1; done' >> /tmp/foo
^C
$ od -a /tmp/foo
0000000    h   e   l   l   o  nl   h   e   l   l   o  nl                
0000014
(I've done as you say in the other Terminal.)
On the other hand, as I mentioned above, with ">" in place of ">>" you would get

$ sh -c 'while :; do echo hello; sleep 1; done' > /tmp/foo
^C
mini:~ fz$ od -a /tmp/foo
0000000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
*
0000100  nul nul   h   e   l   l   o  nl   h   e   l   l   o  nl        
0000116
I hope this clears it up! (I'd rather keep the 5-line script than switch to one that makes 25...)

[ Reply to This | # ]