I am trying to download files from a database using wget and url. For instance.
wget " http://www.rcsb.org/pdb/files/1BXS.pdb "
Thus, the format of the URL is: http://www.rcsb.org/pdb/files/ ($ idnumber) .pdb "
But I have many files to download; so I wrote a bash script that reads id_numbers from a text file, forms a url string and loads wget.
!/bin/bash while read line do url="http://www.rcsb.org/pdb/files/$line.pdb" echo -e $url wget $url done < id_numbers.txt
However, the url string is formed as
.pdb://www.rcsb.org/pdb/files/4H80
So .pdb reloading http . I canβt understand why. Does anyone have an idea? How can I format it so that the URL is
"http://www.rcsb.org/pdb/files/($idnumber).pdb"
? Thank you very much.
Note. This question has been marked as a duplicate of "How to merge strings in bash?" but I really asked for something else. I read this question before asking this question, and it turns out that my problem was preparing the txt file on Windows, but not at the beginning of the line. I edited the title of the question. Hopefully this will become clearer now.
source share