#!/bin/bash #set -x curl -s curl -s https://twitrss.me/twitter_user_to_rss/?user=potus | html2text | grep -v CDAT | grep -v ^1210 | sed -e 's/===============================================================================/===========================/' | while read line do echo "${line}" QUEUE=$(curl -sd "action=wrap&txt=${line}" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://tpaas.chaostreff.ch/ | grep '
  • ' | wc -l) if echo "${line}" | grep ']]>' then curl -sd "action=wrap&txt=########################" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://tpaas.chaostreff.ch/ fi if [ ${QUEUE} -ge 5 ] then echo "Queue full, sleeping...." sleep 35 else echo "Sending one line..." sleep 0.5 fi done