What isn't this crontab working?
printf "`ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2`\n"
I use this function in my crontab so I can obtain my ip address and set that to my Safari home page. Here it is:
@daily Ethanal defaults write com.apple.Safari HomePage -string "http://`whatsmyip`/"; killall Safari; printf "=====`date`=====\nThe preferences were changed and your IP address is `whatsmyip`\n" >> /Users/Ethanal/Library/Logs/crontab.log
What this does is sets my Safari home page to my ip address so I don't have to do it manually every time the ip address changes, then writes a notification to a .log file I created called crontab.log. The only problem is, the homepage doesn't change, and the notification in the console file leaves out my ip address (like below).
=====Wed Sep 2 18:00:01 EDT 2009=====
The preferences were changed and your IP address is
Can someone help me figure out why this isn't working?