Skip to content

Instantly share code, notes, and snippets.

@deepfriedmind
Created August 3, 2015 21:34
Show Gist options
  • Save deepfriedmind/a6cdfa320c8cc842cb77 to your computer and use it in GitHub Desktop.
Save deepfriedmind/a6cdfa320c8cc842cb77 to your computer and use it in GitHub Desktop.

Revisions

  1. deepfriedmind created this gist Aug 3, 2015.
    15 changes: 15 additions & 0 deletions showcolors.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash

    i=30
    for color in "black" "red" "green" "yellow" "blue" "purple" "cyan" "white" ; do
    for attr in 0 1; do
    if [[ $attr == 1 ]]; then
    prefix="bold/light "
    else
    prefix=""
    fi
    echo -en "\033[${attr};${i}mThis is ${prefix}${color} text\033[0m\n"
    done
    echo # newline
    ((i++))
    done