ssl-cert-check icon indicating copy to clipboard operation
ssl-cert-check copied to clipboard

sorting by cert expiration days

Open KB7777 opened this issue 8 years ago • 2 comments

Hello.

Great job, but it will be very useful to print sites from file with sorting of expiration days. Is it possible to implement? Where there is near 200 sites there is a problem to read whole listing :)

Regards.

EDIT: Sorry :) bash ssl-cert-check.sh -f sitelist |sort -k6 works fine :)

KB7777 avatar Oct 23 '17 10:10 KB7777

sort -k6 doesn't handle the header. You also want a numeric sort - 30 days is greater than 4.

I use this wrapper as a cron job, which sorts by expiration & hostname.

It runs daily, produces a report weekly - or sooner if a certificate is near expiration. However, it is not pure bash - it does use Perl. (The -f is 'ssl_certs', in the same directory as the script.)

tlhackque avatar Nov 26 '17 12:11 tlhackque

@tlhackque -- nice workaround! Anyway you stick that in your github account and add some documentation? Would love to be able to link to it.

Matty9191 avatar Jan 25 '18 15:01 Matty9191