为什么Bash中的wget会导致400错误请求错误?

为什么Bash中的wget会导致400错误请求错误?,bash,wget,Bash,Wget,我在文本文件中有这些数据: -O BNU-ESM-pr-Historical-19560101-19601231.nc 我将此代码用于.sh文件: #!/bin/bash while read -r line; do wget $line; done < pr_china.txt #/bin/bash 而read-r行;做wget$行;完成

我在文本文件中有这些数据:

-O BNU-ESM-pr-Historical-19560101-19601231.nc

我将此代码用于.sh文件:

#!/bin/bash
while read -r line; do wget $line; done < pr_china.txt
#/bin/bash
而read-r行;做wget$行;完成
BASH中命令的结果:

ahmad@ahmad:/mnt/c/script_sh_files$ ./pr_china.sh --2018-12-29 23:10:30-- https://dataserver.nccs.nasa.gov/thredds/ncss/bypass/NEX-GDDP/bcsd/historical/r1i1p1/pr/BNU-ESM.ncml?var=pr&north=55&west=72&east=136&south=16&horizStride=1&time_start=1956-01-01T12%3A00%3A00Z&time_end=1960-12-31T12%3A00%3A00Z&timeStride=1%0D Resolving dataserver.nccs.nasa.gov (dataserver.nccs.nasa.gov)... 2001:4d0:2418:2800::a99a:9229, 169.154.146.41 Connecting to dataserver.nccs.nasa.gov (dataserver.nccs.nasa.gov)|2001:4d0:2418:2800::a99a:9229|:443... connected. HTTP request sent, awaiting response... 400 Bad Request 2018-12-29 23:10:33 ERROR 400: Bad Request. ahmad@ahmad:/mnt/c/script\u sh\u files$。/pr\u china.sh --2018-12-29 23:10:30-- https://dataserver.nccs.nasa.gov/thredds/ncss/bypass/NEX-GDDP/bcsd/historical/r1i1p1/pr/BNU-ESM.ncml?var=pr&north=55&west=72&east=136&south=16&horizStride=1&time_start=1956-01-01T12%3A00%3A00Z和时间间隔=1960-12-31T12%3A00%3A00Z和时间间隔=1%0D 解析dataserver.nccs.nasa.gov(dataserver.nccs.nasa.gov)。。。2001:4d0:2418:2800::a99a:9229169.154.146.41 连接到dataserver.nccs.nasa.gov(dataserver.nccs.nasa.gov)| 2001:4d0:2418:2800::a99a:9229 |:443。。。有联系的。 HTTP请求已发送,正在等待响应。。。400错误请求 2018-12-29 23:10:33错误400:请求错误。
在使用pr_china.txt文件之前,先在该文件上运行dos2unix


请参阅:

您的问题本身不清楚。欢迎使用堆栈溢出。请阅读有关如何提问并获得回复的指导。这个问题不清楚,可能会被删除