小编Wal*_*des的帖子

在 if 中使用时数组不会扩展

我正在创建一个脚本,它将帮助更新 GNU/Linux 系统中的 GoLang 编译二进制文件。

\n

但它失败了

\n
#!/usr/bin/env bash\n# -*- coding: utf-8 -*-\n# set -e\n# ==============================================================================\n# title             : Semi Automatic Update GoLang\n# description       : Script for Install, setup path, permission and update golang\n# author            : Walddys Emmanuel Dorrejo C\xc3\xa9spedes\n# usage             : bash up_install.sh\n# notes             : Execute this Script will ask sudo password\n# dependencies      : wget awk sed curl tar\n# ==============================================================================\n\n## Get Golang Versions from repository\ndeclare -a go_jversion go_sversion\nreadarray -t go_jversion < <(curl -s https://go.googlesource.com/go/+refs?format=JSON | grep -Eo "go[0-9]\\.[^\\"]+" | …
Run Code Online (Sandbox Code Playgroud)

arrays bash shell scripting

1
推荐指数
1
解决办法
75
查看次数

标签 统计

arrays ×1

bash ×1

scripting ×1

shell ×1