Need some help debugging a Unix command line for use in the Mac Terminal app


Dec 7, 2011
Miami, Florida
As part of some desktop customization I've been working on today after installing GeekTool on my iMac, I need a particular line of Unix code to work correctly, and so far it isn't working for me.

Basically, I'm trying to query to get some weather information. I've followed the instructions here and got stuck at step number 4.

Per those instructions, the line I need to get the weather for my city should be as follows (to see the full line, you must use the scrollbar which appear when hovering over the line):
curl -s ‘’ | grep 'temperature-fahrenheit' | head -1 | awk -F '>' '{print $2}' | sed 's/<\/span'// | awk '{print int(($0-32)*5/9)}’

In step number 4, the author of the article offers a suggestion for a possible fix:


Unfortunately, the possible fix suggests, as you can see, to replace '>' (greater than) in the command line by '>'. That doesn't make sense. Replace > with >? I am hoping someone who is familiar with Unix can look at the above line of code and hopefully whatever is wrong will jump out at them (I've already tweaked the line a bit to see if I could fix it myself, but so far, no luck). I will also contact the author of the article for clartification, but the last time someone commented on those instructions was 218 days ago, so I'm not holding my breath for a reply over at that site.

Thanks in advance.

Edit: Corrected link in second paragraph.
Last edited: