linux/mac脚本语言总结

1. 命令行传参, 条件语句

if [[ $1 = "happy" ]]; then
    echo "I'm happy"
else
    echo "I'm not happy"
fi

效果:

 

posted @ 2023-04-13 11:10  Shiyu_Huang  阅读(29)  评论(0编辑  收藏  举报