[dundee] Defcon-16 Media Archives

Rick Moynihan rick.moynihan at gmail.com
Thu Mar 12 00:29:47 UTC 2009


2009/3/11 Nicholas Walker <tel0seh at googlemail.com>:
> I managed to sort out an automated download. Heres what I did.
>
>
> wget https://www.defcon.org/podcast/defcon-16-video.rss
>
> then
>
> cat defcon-16-video.rss | grep .m4v > dump.txt
>
> then
>
> cat dump.txt
>
> cat dump.txt | cut -d '"' -f2 > urls.txt
>
> Then using this shell script:
>
>  #!/bin/sh
>   exec< "urls.txt"
>    value=0
>    while read line
>    do
>             wget $line
>    done

I offer a small improvement:

If you're going to write a shell script you might as well include the
user commands before hand as part of the script.  At least that's what
I first thought; however in this simple case you're better writing it
on as a one liner:

wget -qO - https://www.defcon.org/podcast/defcon-16-video.rss | grep
m4v | cut -d '"' -f2 | wget -i -

Redirecting everything through stdout/stdin has the advantage of not
leaving temporary files on your disk.

R.



More information about the dundee mailing list