I am new to Linux/shell scripting having moderate knowledge.
In my script, I need the execution time of command (say 'ls') in mili seconds level. For this, I would like to use 'time' command. The problem is that, how to save the output of time command in a variable (for other commands, this can be done easily)?
Going further, the o/p of 'time' command:
In my script, I would like to use only middle line "user 0m0.004s" saved to the variable but unable to find out the way. Is that something related to 'awk' or 'sed'
Can someone help me out with this issue. Thanks a lot.