shell/结构化命令/使用双方括号.sh

10 lines
126 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
# using pattern matching
if [[ $USER == r* ]]
then
echo "Hello $USER"
else
echo "Sorry, I do not know you"
fi