Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo " Enter the Name , Place ,Thing to Print the Same "
- echo " PLEASE ENTER IN THE BELOW FORMAT TO WORK "
- echo " -n[SPACE]name -p[SPACE]place -t[SPACE]thing"
- if [ $# -eq 0 ]
- then
- echo "ENTER THE ARGUMENTS PLEASE"
- fi
- while getopts n:p:t: opt
- do
- case "$opt" in
- n)na="$OPTARG";echo "The name is $na" ;;
- p)pa="$OPTARG";echo "The place is $pa" ;;
- t)ta="$OPTARG";echo "The thing is $ta" ;;
- *)echo "You Haven't entered anything";;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement