change the output format for time command

2016-08-16 1 min read bash
If you are doing some scripting and using ‘time’ command, then you know sometimes it becomes difficult to capture the output as the output would be something like this: : amit ; time ls real 0m0.002s user 0m0.000s sys 0m0.001s So, it is better to change that format. Here is simple example: 1 <td> <div class="text codecolorer"> &nbsp; </div> </td> </tr> TIMEFORMAT=’real %3R user %3U sys %3S pcpu %P’ time ls amit ; TIMEFORMAT=’real %3R user %3U sys %3S pcpu %P’ time ls 0. Continue reading