I'm wondering if is possible to convert a date as show Oct 31 00:00:00 2013 GMT to 10-31-2013.
I'm getting the date as follow:
NotBeforeDate=$(openssl x509 -noout -in ${CERTIFICATE} -dates | grep "notBefore")
The date that I'm getting is Oct 31 00:00:00 2013 GMT and I wanted to convert it to 10-31-2013.
There's any command that could do that? Or do I have to do it all manually?
If so, the best way is create my own function and send the long date as parameter and return a short date.