Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Define color codes
- RED='\033[0;31m'
- GREEN='\033[0;32m'
- YELLOW='\033[0;33m'
- BLUE='\033[0;34m'
- MAGENTA='\033[0;35m'
- CYAN='\033[0;36m'
- WHITE='\033[0;37m'
- NC='\033[0m' # No Color (reset)
- # Example usage
- echo -e "This is ${RED}red${NC} text."
- echo -e "This is ${GREEN}green${NC} text."
- echo -e "This is ${YELLOW}yellow${NC} text."
- echo -e "This is ${BLUE}blue${NC} text."
- echo -e "This is ${MAGENTA}magenta${NC} text."
- echo -e "This is ${CYAN}cyan${NC} text."
- echo -e "This is ${WHITE}white${NC} text."
- # You can also use it directly without variables:
- echo -e "This is \033[1;36m bold cyan \033[0m text"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement