project="aaaaa" if [[ ${project} =~ "aaa" ]]; then cp aaa.txt bbb.txt fi if [[ ${project} =~ "ccc" ]]; then cp aaa.txt ccc.txt fi
测试
project="aaaaa" if [[ ${project} =~ "aaa" ]]; then echo "aaa111" else echo "aaa222" fi if [[ ${project} =~ "ccc" ]]; then echo "aaa555" else echo "aaa666" fi
请登录之后再进行评论