Skip to content

Instantly share code, notes, and snippets.

View smguggen's full-sized avatar

Steven Guggenheimer smguggen

  • Amazon Web Services (AWS)
  • New Orleans
  • X @stevieb97
View GitHub Profile
@smguggen
smguggen / colors.sh
Created March 1, 2025 17:07
Format Command Line Output
#!/usr/bin/env bash
color_index() {
echo -e "\033[0;"30"m Black/Gray: (0;30); \033[1;"30"m Bold Gray: (1;30)"
echo -e "\033[0;"31"m Red: (0;31); \033[1;"31"m Bold Red: (1;31)"
echo -e "\033[0;"32"m Green: (0;32); \033[1;"32"m Bold Green: (1;32)"
echo -e "\033[0;"33"m Yellow: (0;33); \033[1;"33"m Bold Yellow: (1;33)"
echo -e "\033[0;"34"m Blue: (0;34); \033[1;"34"m Bold Blue: (1;34)"
echo -e "\033[0;"35"m Purple: (0;35); \033[1;"35"m Bold Purple: (1;35)"
echo -e "\033[0;"36"m Baby Blue: (0;36); \033[1;"36"m Bold Baby Blue: (1;36)"
@smguggen
smguggen / flags.sh
Last active May 15, 2025 14:59
Parse Command Line Arguments
#!/usr/bin/env bash
stripslashes() {
echo $1 | sed 's/-*//'
}
parseobj() {
RESULT=""
COUNT=1
LENGTH=$(echo $1 | grep -o ";" | wc -l)