Skip to content

Instantly share code, notes, and snippets.

@sangheonhan
Created January 11, 2019 07:09
Show Gist options
  • Save sangheonhan/e4a57308b39e7d1c462f751de826c5c0 to your computer and use it in GitHub Desktop.
Save sangheonhan/e4a57308b39e7d1c462f751de826c5c0 to your computer and use it in GitHub Desktop.
터미널 256색 출력 (bash)
#! /bin/bash
COLUMNS=15
x=`tput op`
y=`printf %$((${COLUMNS}-6))s`
for i in {0..256}
do
o=00$i
echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment