Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Command : echo
- →echo what is your name?
- Output : what is your name?
- → echo -e “what is your name? \n how old are you?”
- output:
- what is your name?
- how old are you?
- ----”” need to use for new line
- Command: read (for taking input)
- → read a
- read b
- -----2 input
- → read a b
- -----2 input together. In this case after giving 1 input need to give a “space” to give the second input
- Using shellscript:
- nano new
- →
- echo -e "what is your name ? \n how old are your ?"
- read a b
- --save & exit
- chmod 777 new
- ./new
- for see the value of variable a and b:
- command:
- echo $a
- echo $b
- Using shellscript:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement