0
我的代码有以下问题:wget不终止
下载完成后,脚本不会终止。它似乎在等待更多的网址。
我的代码:
#!/bin/bash
cd "$1"
test=$(wget -qO- "$3" | grep --line-buffered "tarball_url" | cut -d '"' -f4)
echo test:
echo $test
echo ==============
wget -nd -N -q --trust-server-names --content-disposition -i- ${test}
为$test
一个例子:
https://api.github.com/repos/matrixssl/matrixssl/tarball/3-9-1-open https://api.github.com/repos/matrixssl/matrixssl/tarball/3-9-0-open
'-i-'意味着从标准输入读取URL列表。所以它等着你输入网址。 – Barmar
是的,当我写这篇文章时,但我该如何终止它? '$ test'包含网址。 –