[colug-432] Podcast script

Stephen P. Potter spp at unixsa.net
Mon Mar 29 11:35:42 EDT 2010


Use awk or sed to grab just the part you want. 

Bill Baker <bill_chris at earthlink.net> wrote:

>I'm trying to write a script that downloads a web page that has the URL
>for a podcast on it, searches for the URL (which ends with .m4v) and
>downloads it to my Desktop.  Here's what I have so far:
>
>---------------
>#!/bin/bash
>wget --no-cache http://podcasturl/podcast.xml
>url=`grep .m4v podcast.xml`
>wget $url -O ~/Desktop
>rm podcast.xml
>---------------
>
>I know that in the third line grep doesn't work because it returns the
>whole line, not just the URL.  Is there anything else I can use to get
>it to return just the URL?
>
>_______________________________________________
>colug-432 mailing list
>colug-432 at colug.net
>http://lists.colug.net/mailman/listinfo/colug-432



More information about the colug-432 mailing list