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'包含網址。 –