Erreur32 gist felülvizsgálása 6 months ago. Revízióhoz ugrás
Nincsenek változtatások
Berti gist felülvizsgálása 9 years ago. Revízióhoz ugrás
1 file changed, 21 insertions
256-colors.sh(fájl létrehozva)
| @@ -0,0 +1,21 @@ | |||
| 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 | + | ||
| 9 | + | for 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 | |
| 19 | + | done | |
| 20 | + | ||
| 21 | + | exit 0 | |
Újabb
Régebbi