加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
get-code.sh 864 Bytes
一键复制 编辑 原始数据 按行查看 历史
chinnkarahoi 提交于 2020-11-13 11:22 . update
code1=
code2=
code3=
code4=
for srv in $(docker-compose config --services);do
CMD="docker logs $srv 2>/dev/null"
line="$(eval $CMD | grep -A1 '互助码' | grep -v '^--$' | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g" | sed 'N;s/\n/ /' | sort -u )"
[ -z "$code1" ] || code1+=@
[ -z "$code2" ] || code2+=@
[ -z "$code3" ] || code3+=@
[ -z "$code4" ] || code4+=@
code1+=$(echo "$line" | grep "东东农场" | head -n 1 | grep -Eo '[a-zA-Z0-9_=+/]{15,}')
code2+=$(echo "$line" | grep "东东萌宠" | head -n 1 | grep -Eo '[a-zA-Z0-9_=+/]{15,}')
code3+=$(echo "$line" | grep "种豆得豆" | head -n 1 | grep -Eo '[a-zA-Z0-9_=+/]{15,}')
code4+=$(echo "$line" | grep "京小超" | head -n 1 | grep -Eo '[a-zA-Z0-9_=+/]{15,}')
done
echo FRUITSHARECODES=$code1
echo PETSHARECODES=$code2
echo PLANT_BEAN_SHARECODES=$code3
echo SUPERMARKET_SHARECODES=$code4
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化