if
判断命令是否存在
if [[ -e /usr/bin/curl ]];thenecho 111elseecho 222fi
函数中判断目录是否存在 ```shell function get_ansible_code() {
[[ -d "/abc" ]] && { echo "[WARN] ansible code already existed"; return 0; }
}
get_ansible_code ```
- 如果存在输出echo
- 如果不存在直接return 0(退出)
