I need to retrieve the current time in seconds in a old machine (bash version 4.3) and this command is not working.
date +%s
It retrieves "%s" Any idea of what is wrong here?
现在,这对我有用:
nawk 'BEGIN {srand();time=srand();print time}' </dev/null
Try with printf
function.
$ printf '%(%s)T' -1
1635846449
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.