Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #screen scrape palace premier league and FA cup fixtures to a single ics file.
- tdir=$TMP/footy
- cdir=$HOME/Documents/calendar
- calname=$cdir/cpfc.ics
- mkdir -p $tdir
- cd $tdir
- rm *.ics
- lynx -dump "http://www.premierleague.com/en-gb/matchday/matches.html?paramClubId=31¶mComp_8=true¶mComp_1=true&view=.dateSeason" > z.z
- arr=(`grep -a "\.ics\b" z.z |awk '{print $2}'`)
- for item in ${arr[*]}
- do
- wget $item
- rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
- done
- cat *.ics > cpfc.ics
- cp cpfc.ics $calname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement