Check SSL/TLS expiry dates across a list of remote domains in parallel

# Check certificate expiry across domains using xargs in parallel:
cat domains.txt | xargs -n1 -P4 -I{} bash -c '
  end_date=$(echo | openssl s_client -servername "$1" -connect "$1":443 2>/dev/null 
    | openssl x509 -noout -enddate 2>/dev/null | cut -d= -f2)
  echo "$1: "
' _ {}