annotate myrss/myrss_update.sh @ 19:fce61e65e3ae

myrss_update.sh: simplify printing *.feedtmp
author paulo@thepaulopc
date Wed, 10 Nov 2010 22:30:04 -0800
parents 3551de5fef13
children f93693980ead
rev   line source
paulo@8 1 #!/bin/sh
paulo@8 2
paulo@9 3 TIMESTAMP=$(date '+%FT%T%:z')
paulo@18 4 TIMEOUT=60
paulo@18 5
paulo@18 6 i=0
paulo@18 7 for URL in $(grep -v '^#' FEEDS)
paulo@18 8 do
paulo@18 9 FN=$((i++)).feedtmp
paulo@18 10 wget -q -T ${TIMEOUT} -U '' -O - ${URL} | xsltproc step1.xsl - | xsltproc step2.xsl - > ${FN} &
paulo@18 11 done
paulo@18 12
paulo@18 13 wait
paulo@18 14
paulo@9 15 echo '<HTML>'
paulo@9 16 echo '<HEAD>'
paulo@9 17 echo "<TITLE>${TIMESTAMP}</TITLE>"
paulo@9 18 echo '<LINK REL="stylesheet" TYPE="text/css" HREF="index.css">'
paulo@9 19 echo '</HEAD>'
paulo@9 20
paulo@9 21 echo '<BODY>'
paulo@9 22 echo "<H1>${TIMESTAMP}</H1>"
paulo@8 23
paulo@19 24 for j in $(seq 0 ${i})
paulo@19 25 do
paulo@19 26 cat ${j}.feedtmp
paulo@19 27 done
paulo@9 28
paulo@9 29 echo '</BODY>'
paulo@9 30 echo '</HTML>'
paulo@18 31
paulo@18 32 rm *.feedtmp