Ostatnio aktywny 1 month ago

256-colors.sh Surowy
1#!/bin/bash
2
3# This program is free software. It comes without any warranty, to
4# the extent permitted by applicable law. You can redistribute it
5# and/or modify it under the terms of the Do What The Fuck You Want
6# To Public License, Version 2, as published by Sam Hocevar. See
7# http://sam.zoy.org/wtfpl/COPYING for more details.
8
9for fgbg in 38 48 ; do #Foreground/Background
10 for color in {0..256} ; do #Colors
11 #Display the color
12 echo -en "\e[${fgbg};5;${color}m ${color}\t\e[0m"
13 #Display 10 colors per lines
14 if [ $((($color + 1) % 10)) == 0 ] ; then
15 echo #New line
16 fi
17 done
18 echo #New line
19done
20
21exit 0