I am trying to execute date command in unix server for yesterday. The commands tried are :
date --date="1 day ago" date --date="1 days ago" date --date="yesterday" date --date="-1 day"
These command work in a server but the same command does not work in few other servers, where date prints properly the current date. Could anyone suggest what could be the issue with the other servers?
I get an error like :
illegal option -- date=1 day ago
The server Details: SunOS wupsa02a0014 5.10 Generic_147440-15 sun4u sparc SUNW,SPARC-Enterprise