0. Internet 1. Text 2. Graphics 3. System 4. File 5. Misc 6. Palm 7. OS X |
Sequence expressions in wget and curl # Given a range of JPGs to batch download: http://example.com/manga/manga_06p01.jpgone approach using wget would be: $ wget http://example.com/manga/manga_06p{00..99}.jpgBash 4 is required for brace expansion using a range. Unfortunately, the expression fails to expand at all when read from a file (e.g., $ wget -i urls.txt). curl, on the other hand, does not depend on Bash for sequencing: $ curl -O http://example.com/manga/manga_06_p[00-99].jpgso it will correctly parse sequences in a properly-formatted text file (e.g., urls.txt): url = "http://example.com/manga/manga_06_p[00-99].jpg"like so: $ curl --remote-name-all -K urls.txt /nix | Sep 12, 2011 |
Categories
Blosxom Archive
2012: 5 4 3 2 1
2011: 12 11 10 9 8 7 6 5 4 3 2 1 2010: 12 11 10 9 8 7 6 5 4 3 2 1 2009: 12 11 10 9 8 7 6 5 4 3 2 1 2008: 12 11 10 9 8 7 6 5 4 3 2 1 2007: 12 11 10 9 8 7 6 5 4 3 2 1 2006: 12 11 10 9 8 7 6 5 4 3 2 1 2005: 12 11 10 Blogger Archive
Ezine Archive
|