Supondo que a lista de IDs de arquivos esteja em um arquivo chamado file_ids.txt.
for i in $(cat file_ids.txt); do
curl http://203.90.117.109/wds_cdma/wds.aspx?min=$i -O -s >> output.txt;
done
O acima irá criar um monte de comandos como este:
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000847307897 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000857827460 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404001044194601 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000835511595 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000338418501 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000338654003 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000290144612 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000344175621 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000290144612 -O -s >> output.txt
curl http://203.90.117.109/wds_cdma/wds.aspx?min=404000844713523 -O -s >> output.txt
O arquivo acima percorre a lista de IDs de arquivos e executa o comando curl
anexando a saída do HTTP GET ao arquivo output.txt
. O operador >>
pega a saída dos comandos curl
e a anexa ao arquivo.