Advertisement
Guest User

TanvirOs123

a guest
Aug 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Command : echo
  2.  
  3. →echo what is your name?
  4. Output : what is your name?
  5.  
  6. → echo -e “what is your name? \n how old are you?”
  7. output:
  8. what is your name?
  9. how old are you?
  10.  
  11. ----”” need to use for new line
  12.  
  13. Command: read (for taking input)
  14. → read a
  15. read b
  16. -----2 input
  17.  
  18. → read a b
  19. -----2 input together. In this case after giving 1 input need to give a “space” to give the second input
  20.  
  21.  
  22.  
  23. Using shellscript:
  24.  
  25. nano new
  26. echo -e "what is your name ? \n how old are your ?"
  27. read a b
  28. --save & exit
  29.  
  30. chmod 777 new
  31. ./new
  32.  
  33.  
  34.  
  35. for see the value of variable a and b:
  36. command:
  37. echo $a
  38. echo $b
  39.  
  40.  
  41. Using shellscript:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement