nohup with while loop
1
0
Entering edit mode
3.9 years ago
pt.taklifi ▴ 60

Hi everyone. I am trying to download a list of sra files from SRA sever. I stored all SRA accession codes in a file named accList.txt so that each line is one accession code. I want to use nohup to download all of the files automatically . I run the code below but it seems that it does not work properly.

nohup bash -c "while read -r line; do prefetch --ngc prj_26719_D29472.ngc $line ; done < accList.txt " 2>error.out

and in the out put file nohup.out I get the follwing message.

Usage:
  prefetch [options] <SRA accession> [...]
  Download SRA files and their dependencies

  prefetch [options] --cart <kart file>
  Download cart file

  prefetch [options] <URL> --output-file <FILE>
  Download URL to FILE

  prefetch [options] <URL> [...] --output-directory <DIRECTORY>
  Download URL or URL-s to DIRECTORY

  prefetch [options] <SRA file> [...]
  Check SRA file for missed dependencies and download them

can anyone please help me with this issue? thank you

bash loop SRAtoolkit • 2.1k views
ADD COMMENT
4
Entering edit mode

Somewhat related comment, but not an answer to the specific question: consider using tmux or screen instead of nohup, its much more user-friendly and powerful once you get used to it.

ADD REPLY
1
Entering edit mode

tmux on mosh is computer heaven

ADD REPLY
2
Entering edit mode
3.9 years ago
.... .ngc $line ; done <

use simple quotes, not double quotes.... https://stackoverflow.com/questions/6697753/

ADD COMMENT
0
Entering edit mode

this seems to work right now. Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2495 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6