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

10 lines
126 B
Bash

#!/bin/bash
# using pattern matching
if [[ $USER == r* ]]
then
echo "Hello $USER"
else
echo "Sorry, I do not know you"
fi