I am running a command that looks like this:
Code:
./ssl-cert-check.sh -s oc.mydomain.com -p 443
It produces this output:
Code:
Host Status Expires Days
----------------------------------------------- ------------ ------------ ----
oc.mydomain.com:443 Valid Feb 16 2017 90
I want to extract the "Days" from the output, 90 in this instance.
I have been unsuccessful using the following bash command
Code:
./ssl-cert-check.sh -s oc.visionsxtreme.com -p 443|grep '/([0-9])+$/m'
This regex appears to work in the web regex testers, but I cannot produce the desired results in the shell. What am I doing wrong, besides driving myself crazy?!
Thank you. Ben