The bash
below will download all the files in download
to /home/Desktop/folder
. That works great, but within /home/Desktop/folder
there are several folders bam
, other
, and vcf
, is there a way to specify by extention in the download file where to download it to?
For example, all .pdf and .zip
are downloaded to /home/Desktop/folder/other
, all .bam
are downloaded to /home/Desktop/folder/bam
, and all .pdf.gz
are downloaded to /home/Desktop/folder/vcf
. Thank you :).
download
file1.pdf
file2.pdf
coverage(1).zip
coverage(2).zip
001__96.bam
002_96.bam
005.vcf.gz
006.vcf.gz
while read new; do
echo $new
aria2c -x 4 -l log.txt -c -d /home/Desktop/folder --use-head=true --http-user "<user." --http-passwd <password> xxx://www.example.com/folder/"$new"
done < /home/download