linux:bash_text_formatting
#!/bin/bash # # Color definition # red='\033[0;31m' ; bred='\033[1;31m' ; green='\033[0;92m' ; blue='\033[0;36m' ; bold='\033[1m' ; normal='\033[0m' check () { /usr/bin/printf "${green}\xE2\x9C\x94${normal}"; } error () { printf "${bred}Error...!${normal}"; } # # Print examples # printf "${normal}Normal Text\n" printf "${red}Red Text\n" printf "${green}Green Text\n" printf "${blue}Blue Text\n" printf "${bold}Bold Text\n" printf "${bred}Bold Red Text\n\n" # # Execute function check and error # check error
linux/bash_text_formatting.txt · Last modified: 12/01/2024 15:01 by Allan