Monday 15 April 2013

shell - How long does it take for my command to run -


I want to run different command line functions. How can I see how long a task runs and then it cancels the conditional with the command line or the Bash script? "post-text" itemprop = "text">

Try this:

  SEC_MAX = 10 command_forcounter & amp; _pid = $! While kill -0 $ _pid & gt; / Dev / null 2 ​​& gt; and 1; Do (CUR_SEC> = SEC_MAX)) & amp; Amp;  
  ((CUR_SEC> = SEC_MAX)) & amp; Amp; ; Exit   

  if ((CUR_SEC> = SEC_MAX)); Then exit; Fi    

No comments:

Post a Comment