dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

colors-256.sh (333B)


      1 #!/bin/sh
      2 
      3 i=0
      4 j=0
      5 while [ "$i" -le 255 ]; do
      6 	printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
      7 	i=$(($i+1))
      8 	j=$(($j+1))
      9 	if [ $j -eq 16 ]; then
     10 		j=0
     11 		printf '\n'
     12 	fi
     13 done
     14 
     15 printf "regular text, "
     16 printf "\e[1mbold text\e[0m, "
     17 printf "\e[3mitalic text\e[0m, "
     18 printf "\e[4munderline text\e[0m, "
     19 printf "\e[9mstrikethrough text\e[0m\n"