#!/bin/bash datetime=`date +%Y-%m-%d` ipaddress=`curl http://ip.3322.net` echo $datetime','$ipaddress >> /home/pi/iphistory.txt