Just a few minutes after trying to check domain’s SSL Certificate expiry date with python which requires around ten lines of code, I found a shell script which doing that task in just one line, here’s the script
#!/bin/bash
echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -noout -dates
source: