【发布时间】:2016-03-08 15:34:03
【问题描述】:
我有多个(超过 100 个)类似的:
wget -q -nH --cut-dirs=5 -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks http://heasarc.gsfc.nasa.gov/FTP/swift/data/obs/2009_02//00031327004/auxil/
wget -q -nH --cut-dirs=5 -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks http://heasarc.gsfc.nasa.gov/FTP/swift/data/obs/2009_01//00031327001/uvot/
wget -q -nH --cut-dirs=5 -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks http://heasarc.gsfc.nasa.gov/FTP/swift/data/obs/2010_12//00031856009/uvot/
wget -q -nH --cut-dirs=5 -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks http://heasarc.gsfc.nasa.gov/FTP/swift/data/obs/2008_01//00031043003/uvot/
wget -q -nH --cut-dirs=5 -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks http://heasarc.gsfc.nasa.gov/FTP/swift/data/obs/2012_01//00032237004/uvot/
有人告诉我,这可以使用 bash 脚本快速轻松地完成,如果可能的话,有人可以给我一个示例,用于多个 wget 命令吗?我需要在脚本中包含什么?为我的 n00b 问题道歉,但是......我是其中之一!
【问题讨论】:
-
有多相似?每次通话有什么不同?只是网址?
-
我会用几行更新答案。
-
你在一个文本文件中拥有所有这些 URL 吗?
-
是的,都在一个普通的 .txt 文件中
-
bash your-file-here.txt,如果您只想将其作为脚本运行。