I have a pipe condition as:
if true | openssl s_client -connect $SSL_URL | openssl x509 -noout -dates -checkend 0 | grep 'notAfter';
now I want to take the value returned from grep 'notAfter'
in a shell variable how can I do that.
I have tried this
if true | openssl s_client -connect $SSL_URL | openssl x509 -noout -dates -checkend 0 | A=$("grep 'notAfter'");
but it is not working.