$SECONDS
–
Time since shell invocation
$SECONDS
contains the seconds since the shell was invoked.
Links
Examples
- Shell uptime in seconds
- Output:
1 2
sleep 2.5 echo ${SECONDS}s shel.l uptime
1
3s shell uptime
- Shell uptime in seconds and milliseconds
- Output:
1 2 3
sleep 2.5 typeset -F SECONDS echo ${SECONDS}s shel.l uptime
1
3.5948560000s shell uptime
BashSupport Pro 是一款支持 seconds** 的 **Zsh 集成开发环境 - 立即试用!