Get seconds since epoch in any POSIX compliant shell
- by mattbh
I'd like to know if there's a way to get the number of seconds since the UNIX epoch in any POSIX compliant shell, without resorting to non-POSIX languages like perl, or using non-POSIX extensions like GNU awk's strftime function.
Here are some solutions I've already ruled out...
date +%s // Doesn't work on Solaris
I've seen some shell…