dotfiles/bin/expdays

6 lines
124 B
Bash
Executable File

#!/bin/sh
dat=$(openssl x509 -noout -enddate | cut -d= -f2)
echo $(( ($(date -d "$dat" '+%s') - $(date '+%s')) / 86400 ))