Entries from 2019-06-13 to 1 day
1.使用ps显示的进程运行后到现在经过的时间进行计算(Via) #!/bin/bash pid=$1 elt=$(ps w -p $pid o pid=,cmd=,etime= |awk '{print $NF}') case $(echo $elt | sed -e 's/:/:\n/g' |grep ":" -c) in "1") elt=$(echo $elt |sed -e 's/:/ minutes ago /') ;;…