Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# --- Bash Version Check ---
if [[ -z "${BASH_VERSINFO[0]}" || "${BASH_VERSINFO[0]}" -lt 4 ]]; then
echo "Error: This script requires Bash version 4.0 or higher." >&2
echo "You are running: $BASH_VERSION" >&2
exit 1
fi
# --- Default Variables ---
@job-gordon
job-gordon / gist:5adb241b27e03e8b6e37d8b7e682a9f7
Created October 31, 2025 13:40
another version of converter
#!/bin/bash
# Associative arrays (for keys with spaces) require Bash 4.0+
if [[ -z "${BASH_VERSINFO[0]}" || "${BASH_VERSINFO[0]}" -lt 4 ]]; then
echo "Error: This script requires Bash version 4.0 or higher." >&2
echo "You are running: $BASH_VERSION" >&2
exit 1
fi
input_file=""