H Hook'Em2006 macrumors 6502 Original poster Dec 4, 2011 #1 Im looking for a script that will shows me the days until christmas. Any Help?
mrgraff macrumors 65816 Dec 4, 2011 #2 THEN=`date -v11y -v25d -v12m +%s` SECS=$(($THEN-$(date +%s))) echo "Days: "$(($SECS/3600/24))
H Hook'Em2006 macrumors 6502 Original poster Dec 4, 2011 #3 I tried putting that into a shell script and nothing pulled up. :-/ ---------- Nevermind, I got it working. Thank you for your help!
I tried putting that into a shell script and nothing pulled up. :-/ ---------- Nevermind, I got it working. Thank you for your help!
hayduek macrumors newbie Nov 22, 2017 #4 I've got the script "working" put all it outputs is "-2179". Any ideas?
chown33 Moderator Staff member Nov 22, 2017 #5 hayduek said: I've got the script "working" put all it outputs is "-2179". Any ideas? Click to expand... Replace this: Code: THEN=`date -v11y -v25d -v12m +%s` with this: Code: THEN=`date -v25d -v12m +%s` Explanation of the 'date' cmd's options: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/date.1.html
hayduek said: I've got the script "working" put all it outputs is "-2179". Any ideas? Click to expand... Replace this: Code: THEN=`date -v11y -v25d -v12m +%s` with this: Code: THEN=`date -v25d -v12m +%s` Explanation of the 'date' cmd's options: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/date.1.html
hayduek macrumors newbie Nov 22, 2017 #6 Thanks! I figured it out. Problem was the year code was set to 2011. I changed it to '17 and now it's working just fine. 75 days until the Trucks leave from Fenway to the Spring Training facility in Ft. Myers 😀 Now if I could just get a humidity only script 😛
Thanks! I figured it out. Problem was the year code was set to 2011. I changed it to '17 and now it's working just fine. 75 days until the Trucks leave from Fenway to the Spring Training facility in Ft. Myers 😀 Now if I could just get a humidity only script 😛
chown33 Moderator Staff member Nov 22, 2017 #7 hayduek said: Thanks! I figured it out. Problem was the year code was set to 2011. I changed it to '17 and now it's working just fine. Click to expand... Changing it to 17 works for this year. Then you have to change it to 18 in 2018. And so on. The change I gave uses the current year, whatever it is, so no change needed in 2018, etc.
hayduek said: Thanks! I figured it out. Problem was the year code was set to 2011. I changed it to '17 and now it's working just fine. Click to expand... Changing it to 17 works for this year. Then you have to change it to 18 in 2018. And so on. The change I gave uses the current year, whatever it is, so no change needed in 2018, etc.
hayduek macrumors newbie Nov 22, 2017 #8 Ah! Thanks for the clue! Any idea how to extract just the humidity level from accuweather.com?