Created
February 2, 2015 06:02
-
-
Save dblevins/27ac69986b694712cd74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat > /tmp/termcolors.java <<EOF | |
public class termcolors { | |
public static void main(String[] args) { | |
for (int i = 0; i < 256; i++) { | |
System.out.printf("\033[38;5;%sm#@%03d", i, i); | |
System.out.print(" "); | |
if (i % 12 == 0) System.out.println(); | |
} | |
System.out.println(); | |
} | |
} | |
EOF | |
javac /tmp/termcolors.java && | |
java -cp /tmp termcolors | |
cat <<EOF | |
#!/bin/bash | |
N=202 | |
echo -e "\033[38;5;\${N}mTry Me\033[0m" | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment