Created
July 6, 2020 06:49
-
-
Save subicura/0f7f33590be56cc6a18ec8bfaee61aa3 to your computer and use it in GitHub Desktop.
shell color print
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/sh | |
mypad() { | |
printf "${text_padding+\033[${text_padding}C}" | |
} | |
mycol() { | |
printf "$(seq 0 7 | xargs printf "\033[${2}%sm$1")$(printf "\033[0m")" | |
} | |
printf "\n" | |
printf "\n" | |
printf "$(mypad) $(mycol '██████████ ' '0;3')\n" | |
printf "$(mypad) $(mycol '██████████ ' '0;3')\n" | |
printf "$(mypad) $(mycol '██████████ ' '0;3')\n" | |
printf "$(mypad) $(mycol '██████████ ' '0;3')\n" | |
printf "$(mypad) $(mycol '██████████ ' '0;3')\n" | |
printf "$(mypad) $(mycol '██████████ ' '0;3')\n" | |
printf "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment