Read files into variable using then pass to delete call

I am trying read all the files from list into a variable line using bash . After there are read into the variable they are passed to a delete call. The files appear to be read line (as I can see them with the echo ) by line into the variable, but the delete call is not removing them and I do not know why? Thank you :).

list

overall.html
file1.bam
file2.bam
file1.vcf.gz
file2.vcf.gz

Bash

while read line; do
    echo $line
done < /home/cmccabe/list
wget --user=xxx --password=xxx --xxx --method=DELETE \
xxxx://www.xxxx.com/xxx/xx/xxxx/$line

Try:

while read line; do
    echo $line
wget --user=xxx --password=xxx --xxx --method=DELETE \
     xxxx://www.xxxx.com/xxx/xx/xxxx/$line

done < /home/cmccabe/list
1 Like