Struggling to parse (bash) time command

后端 未结 5 737
甜味超标
甜味超标 2020-12-07 00:55

I\'m struggling to parse the output of the time command in bash - and even to stop it from printing out its output when I call it. This is my test code:

#!/b         


        
5条回答
  •  执念已碎
    2020-12-07 01:20

    Although Solutions hover around the same logic, but still I couldn't find following listed, so another version of the solution:

    TIME=$(time (ls -lh >/dev/null) 2>&1)
    

提交回复
热议问题