shell if [[ ]]的一次应用 直接上代码 #!/bin/bash A="$1" if [[ "$A" == a* ]];then echo "aaa" else echo "$A a*" fi 执行过程