Small Bash utilities for routine infrastructure, certificate, file, and CSV-oriented tasks. The repository is intentionally lightweight and keeps each tool as a standalone script.
.
├── certificates/
├── data/
├── files/
├── network/
├── CONTRIBUTING.md
└── README.md
This repository collects miscellaneous shell helpers that were created for practical administrative tasks. Some scripts are generic, while others reflect specific operational environments and should be reviewed before reuse.
- Bash
- Standard Unix utilities such as
awk,grep,sed,tail, andmv ssh-keygenfor SSH key inspectionopensslfor certificate inspection and request generationncfor TCP connectivity checksmailfor the legacy certificate request workflow inmkcertreq.sh
Checks whether a TCP port is reachable from the current host by using nc.
- Primary use: quick validation of listener reachability without using
telnet - Default port:
50008 - Typical use:
./network/check-connectivity.sh hostname.example 443 - Exit codes:
0on success,1on connection failure,2on missing arguments,127whenncis unavailable
Prints three SSH key properties for the supplied public or private key file.
- Output 1: key length
- Output 2: key fingerprint hash token
- Output 3: key type
- Typical use:
./network/check-ssh-key.sh ~/.ssh/id_rsa.pub
Reads one or more PEM certificates from a file and prints the subject and issuer for each certificate block.
- Primary use: inspecting certificate bundles or concatenated PEM files
- Input expectation: a text file containing one or more
BEGIN CERTIFICATEandEND CERTIFICATEblocks - Typical use:
./certificates/listCertDetails.sh fullchain.pem
Generates a private key, certificate signing request, archival tarball, and notification email for a server certificate workflow.
- Primary use: legacy server certificate request preparation
- Environment assumptions: writable
/root/certs, localmailcommand, and OpenSSL installed in standard locations - Input expectation: one site or hostname argument
- Typical use:
./certificates/mkcertreq.sh site.example
This script is environment-specific and should be reviewed carefully before use in a different organization or host layout.
Renames files that share a common prefix by appending a zero-padded numeric suffix.
- Primary use: renaming outputs after a prior
splitoperation - Current suffix width:
3 - Typical use:
./files/split_with_number_prefix.sh x
If files such as xaa, xab, and xac exist, the script renames them to x001, x002, and x003.
Reads a CSV of current courses and appends matching program-course associations from a second file into ProgsWithCourseAssocs.csv.
- Input 1: file containing active program associations
- Input 2: CSV file whose first column contains course identifiers
- Output:
ProgsWithCourseAssocs.csv - Typical use:
./data/uniquePrograms.sh active_programs.txt current_courses.csv
- Review every script before running it against production systems.
- Run scripts with explicit paths to input files to avoid accidental reads from the wrong directory.
- Prefer testing in a temporary directory when a script modifies files.
- Some scripts predate stricter shell portability and safety conventions; local adaptation may be appropriate.
Scripts are grouped by function to improve discoverability:
network/for connectivity and SSH-related utilitiescertificates/for certificate inspection and request generationfiles/for file renaming or split-output helpersdata/for CSV or text-processing scripts
Additional category folders can be introduced as needed while preserving this domain-based layout.
See CONTRIBUTING.md for the expected branch and merge workflow.