Skip to content

Instantly share code, notes, and snippets.

@mccarthyp-snet
mccarthyp-snet / show_ssl_expire
Last active March 11, 2022 00:28 — forked from bmatthewshea/show_ssl_expire
Retrieve/Check SSL certificate expiration date(s)
#!/bin/bash
# Test for OpenSSL - if not installed stop here.
if ! [[ -x $(which openssl) ]]; then
printf "\nOpenSSL not found or not executable.\nPlease install OpenSSL before proceeding.\n\n"
exit 1
fi
### user adjustable variables ###
# 30 days is default on warnings - overidden on command line with '-d':
@mccarthyp-snet
mccarthyp-snet / findgrep
Last active June 10, 2020 04:40 — forked from mellertson/findgrep
findgrep - find files and then grep found files using a regex pattern
#!/bin/bash
# usage:
#
# search a specific FILE_PATTERN for REGEX_PATTERN
# and print full path and matching lines:
# ./findgrep DIRECTORY FILE_PATTERN REGEX_PATTERN
#
# search all files for REGEX_PATTERN and print unique filenames:
# ./findgrep DIRECTORY REGEX_PATTERN