#!/bin/sh page=index [ -n "${1}" ] && page=${1} [ ! -f "${page}.html" ] && exit 1 # Copy HTML to a web server.... scp ${page}.html prometheus.ethernal.org:public_html/arduino.html # Fetch HTML with appropriate Accept-Encoding: header -> save to raw file /bin/echo -ne "GET /~mjb/arduino.html HTTP/1.0\nAccept-Encoding: gzip\n\n" | nc www.ethernal.org 80 > ${page}_gzip.raw # Process Raw file - delete headers and blank line -> save to raw gzip dat file sed -e '0,/^\r$/d' ${page}_gzip.raw > ${page}_gzip.dat # Process raw gzip dat file into hex array for inclusion in program od -A n -t x1 ${page}_gzip.dat | sed -e 's/ \(..\)/0x\1, /g' -e 's/^/ /' > ${page}_gzip.txt ls -l ${page}_gzip.*