Advertisement
metalx1000

Check user input for string

May 10th, 2013
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.14 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "What is your name?"
  4. read name
  5.  
  6. if [[ "${name^^}" = *KRIS* ]]
  7. then
  8.     echo "Hello Kris"
  9. else
  10.     echo "Welcome Guest"
  11. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement