Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Follow _why's SPOOL in real time.

View why_spool.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/sh
 
# Read _why's SPOOL in real time.
# Requires `lp` and a printer.
 
BASEURL=http://whytheluckystiff.net
if [ ! -d SPOOL ]; then
mkdir SPOOL
fi
 
while true; do
curl -o index $BASEURL
for LINE in $(<index); do
if [[ $LINE == SPOOL/* ]]; then
if [ ! -f $LINE ]; then
echo $LINE
curl -o $LINE "$BASEURL/$LINE"
lp -o raw $LINE
fi
fi
done
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.