@tastapod @Cykelero /bin/sh on FreeBSD doesn’t do that. If we can believe the man page that version of the Bourne shell is with us since 1989
/bin/sh $ SECONDS=3 $ $ for i in $(seq 1 10); do > echo $SECONDS > sleep 1 > done 3 3 3 3 3 3 3 3 3 3
@grumpyoldtechie @Cykelero yep, it’s a bash-ism. Nothing to do with posix Bourne shell. Not sure about ksh.
@grumpyoldtechie @Cykelero looks like ksh also has SECONDS but theirs is more sensible, which is generally true of ksh vs bash in my experience:
https://unix.stackexchange.com/a/114997
@grumpyoldtechie @Cykelero I love that you didn’t trust the first few!
@grumpyoldtechie @Cykelero yep, it’s a bash-ism. Nothing to do with posix Bourne shell. Not sure about ksh.