#!/bin/sh
update_fb() {
count=$(wget -O - "http://api.facebook.com/restserver.php?method=links.getStats&urls=https://www.facebook.com/TaipeiHackerspace" 2>/dev/null | grep -oP "(?<=\<total\_count\>).*?(?=\<\/total\_count\>)")
echo "updating $count"
echo "$count." >&2
}
while [ 1 ] ; do
update_fb
sleep 1
done
Save as fb.sh, then run as follows:
$ ./fb.sh 2> /dev/ttyACM0
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |