issues with 'time' command
I was trying to time the execution time of an application by using this '/usr/bin/time -p ./a.out'. This is returning 'command exited with non-zero status 1' but it is giving me the timing information. How c开发者_JS百科an I get rid of this error. I know that this error code is related to the 'time' command.
From the manual page of time
:
If COMMAND exits with non-zero status, time displays a warning message and the exit status.
Just use the "--quiet" option, $ man /usr/bin/time:
--quiet:
Do not report the status of the program even if it is different from zero.
精彩评论