-nc を使用して終了コードを取得します。

-nc を使用して終了コードを取得します。

wgetこのオプションを使用して既に存在するファイルをダウンロードしようとすると、期待どおりに機能しますが、終了コードがスクリプトを--no-clobber中断1します。終了コードが表示されるのはなぜですか1?どうすれば解決できますか?

$ wget -nc --continue --output-document "/User/Downloads/download.txt" "https://example.com/download.txt"
File ‘/User/Downloads/download.txt’ already there; not retrieving.
$ echo $?
1

ベストアンサー1

おすすめ記事