ps -p $pid -o etime --no-heading|perl -aF'[:-]' -nE'say+pop(@F)+60*pop +(@F)+3600*pop(@F)+84600*pop@F'
In reply to Re: A regular expression that will work for (hh:)mm:ss [converting clock time to seconds]
by JavaFan
in thread A regular expression that will work for (hh:)mm:ss [converting clock time to seconds]
by aware74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |