大佬教程收集整理的这篇文章主要介绍了来自 docker 的 bash 脚本无法按预期运行 if 语句,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用这个具有 bash v4.3.48 和 curl v7.56.1 的图像:
https://hub.docker.com/r/bizongroup/alpine-curl-bash/tags?page=1&ordering=last_updated
在 docker 中,我编写了以下脚本:
email_dest="iz@gmail.com}}"
suffix="@gmail.com"
dm_to=${email_dest%"$suffix"}
if [[ $email_dest == *"@users.noreply.github.com"* ]]
then
echo "Email address is no reply. Please fix your email preferences in Github"
elif [[ $email_dest == *$suffix* ]]
then
curl -X POST -H 'Content-type: application/Json' --data '{"text":"Hello <@'"$dm_to"'>. '{{inputs.parameters.workflow_namE}}' "}' https://hooks.slack.com/services/T01JNE5DXA7/B0246T84N75/hHDk7RUg2BWl2bYbPoN9r
else
echo "Email address is not of digibank domain!"
fi
如果我使用 bash 命令
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的来自 docker 的 bash 脚本无法按预期运行 if 语句全部内容,希望文章能够帮你解决来自 docker 的 bash 脚本无法按预期运行 if 语句所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。