#!/bin/sh DELAY=1 CLEARWEB=/tmp/clearweb.$$ CONVERT=/tmp/onionsed.$$ # these are hostnames for which we must visit onion, accept certificates cat > $CLEARWEB <$CONVERT # convert and print to stdout sed -f $CONVERT <$CLEARWEB | while read onion_url ; do test x$onion_url = x && continue url="https://$onion_url/hello-onion/" echo "open -a "TorBrowser" $url && sleep $DELAY" case $onion_url in *.onion) ;; *) echo oops: $onion_url is not onionified. ; exit 1 ;; esac done # done rm $CONVERT $CLEARWEB echo done. please inspect output to check everything was onionified. 1>&2 exit 0