Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #intialising the user credentials
- echo " WELCOME!! MANIDEEP INAPAKOLLA
- `date` "
- echo "please enter your username :"
- read username
- echo " please enter your password : "
- read password
- #authenticating user
- if [[ " $username " == " manideep " && " $password " == " 1234 " ]]
- then
- showmenu() {
- echo "
- 1)Personal info
- 2)conatct info
- 3)Your current orders
- 4)Your previous orders
- 5)Exit "
- }
- #displaying the user menu
- read_options() {
- echo " please enter your choice : "
- read a
- case $a in
- 1) echo "Name :manideep
- Last name : inapakolla
- Address :204 w 36th street
- City:Kansas
- State:MO "
- ;;
- 2) echo " phone : 816 999999 "
- ;;
- 3) echo "
- Your current orders are
- iPhone 7 and
- Estimated delivery:12/31/2016 "
- ;;
- 4) echo "
- Your previous orders are:
- apple ipad pro
- apple watch series2 "
- ;;
- 5) echo " See you soon
- Goodbye! `date` "
- exit
- ;;
- *)echo " please follow the instructions "
- ;;
- esac
- }
- #calling the functions declared above
- showmenu
- read_options
- #displaying the menu after selecting the options
- while [ "$a" -lt "5" ];do
- showmenu
- read_options
- done
- else
- echo " you entered incorrect password "
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement