这就是我的脚本的样子:
#!/bin/bash
WGETREF='https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/GRCh38_reference_genome/GRCh38_full_analysis_set_plus_decoy_hla.fa'
wget $WGETREF
chmod +x get-ref.sh
我这样称呼它:
sbatch -A OD-projectID get-ref.sh
我尝试做一个脚本,因为我将不得不下载很多类似的文件,是30+ Gb。当直接在命令行中执行wget
时,它会按照应该的方式开始下载。但是,对于shell脚本,输出文件给了我以下错误:
Connecting to ftp.1000genomes.ebi.ac.uk (ftp.1000genomes.ebi.ac.uk)|193.62.193.140|:443... failed: Connection refused.
我有什么需要添加到我的剧本里吗?
我尝试了不同的方法来编写wget
,例如调用第二个脚本:
#!/bin/bash
wget -i url-ref.txt
其中url-ref.txt
是一个简单的文本文件,只有URL。
Bash版本:GNU bash,版本4.4.23(1)-release(x86_64-suse-linux-gnu)。
调试输出是这样的:
DEBUG output created by Wget 1.20.3 on linux-gnu.
Reading HSTS entries from /home/foa003/.wget-hsts
URI encoding = ‘UTF-8’
asking libproxy about url 'https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/GRCh38_reference_genome/GRCh38_full_analysis_set_plus_decoy_hla.fa'
libproxy suggest to use 'direct://'
Converted file name 'GRCh38_full_analysis_set_plus_decoy_hla.fa' (UTF-8) -> 'GRCh38_full_analysis_set_plus_decoy_hla.fa' (UTF-8)
--2023-05-18 11:36:52-- https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/GRCh38_reference_genome/GRCh38_full_analysis_set_plus_decoy_hla.fa
Resolving ftp.1000genomes.ebi.ac.uk (ftp.1000genomes.ebi.ac.uk)... 193.62.193.140
Caching ftp.1000genomes.ebi.ac.uk => 193.62.193.140
Connecting to ftp.1000genomes.ebi.ac.uk (ftp.1000genomes.ebi.ac.uk)|193.62.193.140|:443... Closed fd 3
failed: Connection refused.
Releasing 0x00005555558eb020 (new refcount 1).
我试着在wget
之前添加ping google.com
,似乎可以
1条答案
按热度按时间k0pti3hp1#
在
wget
之前添加ping google.com
有所帮助