I am using perf tool to analyze sort utility . I gave following command.
perf stat -x, ../bin/sort data >/dev/null 2>perf_data
I want to redirect the output of sort to /dev/null and output of perf to perf_data file.
How can I Do this ?
Actually you can put it in parenthesis. Following command has worked for me.
(perf stat -x, ../bin/sort data >/dev/null) 2>perfoutput.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With