Browse > Home / Archive: 24. March 2005

| Subcribe via RSS

using a bash 'for loop' to wget

March 24th, 2005 | 8 Comments | Posted in Bash, Browser

One of the ways that I frequently fetch files from the internet is with wget. It is a very useful command line utility that is capable of fetching anything from one file to mirroring whole sites.

When looking for new and interesting music I often find myself on a page with a few or more mp3 urls. Using firefox to download them all, even with a good download manager is tedious. The following bash script will read from stdin and download each url it sees.

# while read url ; do wget "${url}" ; done

More »