$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 ist eine Zsh IDE mit Unterstützung für $SECONDS - probieren Sie es jetzt aus!