Skip to content

Instantly share code, notes, and snippets.

@aaronpuchert
Created January 24, 2021 22:27
Show Gist options
  • Save aaronpuchert/696ab0f125c0fa2e60561d8bd8d6633f to your computer and use it in GitHub Desktop.
Save aaronpuchert/696ab0f125c0fa2e60561d8bd8d6633f to your computer and use it in GitHub Desktop.

Revisions

  1. aaronpuchert created this gist Jan 24, 2021.
    15 changes: 15 additions & 0 deletions terminal-colors.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash
    echo -e '\\e[1m \e[1mbold\e[21m \\e[21m'
    echo -e '\\e[3m \e[3mitalic\e[23m \\e[23m'
    echo -e '\\e[4m \e[4munderline\e[24m \\e[24m'
    echo -e '\\e[5m \e[5mblinking\e[25m \\e[25m'
    echo -e '\\e[9m \e[9mstrikethrough\e[29m \\e[29m'
    echo -e '\\e[53m \e[53moverline\e[55m \\e[55m'
    echo -e '\\e[XXm'

    for i in $(seq 30 38)
    do
    printf "\e[%dm%d\t\t\e[%dm%d\n" $i $i $((i+60)) $((i+60))
    done

    echo -e '\e[39m\\e[39m - Reset colour'