

1·
9 days agoYou can also avoid cat since you aren’t actually concatenating files (depending on file size this can be much faster):
while read -r url; do echo "download $url"; done < urls.txt


You can also avoid cat since you aren’t actually concatenating files (depending on file size this can be much faster):
while read -r url; do echo "download $url"; done < urls.txt
Out of curiosity, how?
< urls.txt while read -r url; ...Is a syntax error.
while read -r url < urls.txt; ...Result in an infinite loop.