paulo@8: #!/bin/sh paulo@8: paulo@9: TIMESTAMP=$(date '+%FT%T%:z') paulo@18: TIMEOUT=60 paulo@27: MAXPROCS=20 paulo@18: paulo@18: i=0 paulo@27: n=0 paulo@18: for URL in $(grep -v '^#' FEEDS) paulo@18: do paulo@27: FN=$((++i)).feedtmp paulo@27: wget -q -T ${TIMEOUT} -U '' -O - ${URL} | xsltproc step1.xsl - | xsltproc step2.xsl - > ${FN} & paulo@27: if (( $((++n)) > ${MAXPROCS} )) paulo@27: then paulo@27: wait paulo@27: n=0 paulo@27: fi paulo@18: done paulo@18: paulo@18: wait paulo@18: paulo@9: echo '' paulo@9: echo '' paulo@9: echo "${TIMESTAMP}" paulo@9: echo '' paulo@9: echo '' paulo@9: paulo@9: echo '' paulo@9: echo "

${TIMESTAMP}

" paulo@8: paulo@27: for j in $(seq 1 ${i}) paulo@19: do paulo@19: cat ${j}.feedtmp paulo@19: done paulo@9: paulo@9: echo '' paulo@9: echo '' paulo@18: paulo@18: rm *.feedtmp