I can’t figure out how to redirect -rprofile’s command output to a file.
Every time it just outputs stuff from the program not from the profile.
I’m asking this because it writes so much stuff that I can’t even scroll
through it all so the most important things aren’t visible.
On Thu, Jan 13, 2011 at 3:09 PM, Piotr S. [email protected] wrote:
I can’t figure out how to redirect -rprofile’s command output to a file.
Every time it just outputs stuff from the program not from the profile.
I’m asking this because it writes so much stuff that I can’t even scroll
through it all so the most important things aren’t visible.
You need to redirect stderr:
15:15:58 ~$ ruby19 -r profile -e ‘1000.times { 2 + 3 }’ 1>/dev/null
% cumulative self self total
time seconds seconds calls ms/call ms/call name
100.00 0.02 0.02 1 16.00 16.00 Integer#times
0.00 0.02 0.00 1000 0.00 0.00 Fixnum#+
0.00 0.02 0.00 1 0.00 16.00 #toplevel
15:16:01 ~$ ruby19 -r profile -e ‘1000.times { 2 + 3 }’ 2>/dev/null
15:16:13 ~$
Cheers
robert
thank you