Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- RED='\033[31m'
- GREEN='\033[32m'
- BLUE='\033[34m'
- echo Task 3 Registration Form
- read -p "Please enter your Name :" NAME
- read -p "Please enter your date of Birth :" BIRTHDAY
- read -p "Please enter your live Address :" ADDRESS
- read -p "Please enter your favorite Color (RED/GREEN/BLUE):" COLOR
- if [ "$COLOR" = "RED" ]; then
- echo -e "${RED}Your Name = $NAME"
- echo -e "${RED}$NAME's date of Birth = $BIRTHDAY"
- echo -e "${RED}$NAME's Address = $ADDRESS"
- echo -e "${RED}$NAME's favorite Color = $COLOR"
- elif [ "$COLOR" = "GREEN" ]; then
- echo -e "${GREEN}Your Name is $NAME"
- echo -e "${GREEN}$NAME's date of Birth = $BIRTHDAY"
- echo -e "${GREEN}$NAME's Address = $ADDRESS"
- echo -e "${GREEN}$NAME's favorite Color = $COLOR"
- elif [ "$COLOR" = "BLUE" ]; then
- echo -e "${BLUE}Your Name is $NAME"
- echo -e "${BLUE}$NAME's date of Birth = $BIRTHDAY"
- echo -e "${BLUE}$NAME's Address = $ADDRESS"
- echo -e "${BLUE}$NAME's favorite Color = $COLOR"
- fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement