Author Topic: Need Mac Guru  (Read 1623 times)

Offline ehowton

  • Colonel COURAGEOUS Member
  • *********
  • Posts: 7595
  • Fingering the Muse
    • http://ehowton.livejournal.com
Re: Need Mac Guru
« Reply #15 on: September 11, 2009, 03:19:39 PM »
Try a single back-tic.  The one under the tilde.

Offline drax0r

  • Major FANTASTIC Member
  • *******
  • Posts: 3433
  • Muckraker Extraordinaire
    • Anna Texas Community Forum
Re: Need Mac Guru
« Reply #16 on: September 11, 2009, 03:21:26 PM »

VERY quick and dirty in bash:

say `wget --quiet -O - "http://rss.weather.com/weather/rss/local/75409?cm_ven=LWO&cm_cat=rss&par=LWO_rss"| grep "more details" |grep img|awk -F">" '{print $3}'|sed s/"For more details"//g|sed 's/&deg/degrees/g'|awk -F";" '{print $1}'

ok so I open terminal type bash and press enter I get a prompt: bash-3.2$

I paste in your script and press enter and I get another prompt: >

what comes next?

Yeah, try a ` at the end.  I may have pasted one too few characters.

Everything I say, do, imply, or infer is the sole representation and responsibility of the individual who owns this account and does not represent the opinion, policy, position, or intent of any organization or other entity, public or private.

Offline drax0r

  • Major FANTASTIC Member
  • *******
  • Posts: 3433
  • Muckraker Extraordinaire
    • Anna Texas Community Forum
Re: Need Mac Guru
« Reply #17 on: September 11, 2009, 03:23:08 PM »
From my linux VM:

bagside@bagvapp:~$ echo `wget --quiet -O - "http://rss.weather.com/weather/rss/local/75409?cm_ven=LWO&cm_cat=rss&par=LWO_rss"| grep "more details" |grep img|awk -F">" '{print $3}'|sed s/"For more details"//g|sed 's/&deg/degrees/g'|awk -F";" '{print $1}'`
Cloudy, and 79 degrees

Last line is output from the echo - replacing echo with say should have it read.

Looks like I did forget to paste the closing back-tic.
Everything I say, do, imply, or infer is the sole representation and responsibility of the individual who owns this account and does not represent the opinion, policy, position, or intent of any organization or other entity, public or private.

Offline filmnazi

  • Full Member
  • ***
  • Posts: 142
  • libertarian whipping boy
Re: Need Mac Guru
« Reply #18 on: September 11, 2009, 03:36:27 PM »
Thanks guys I appreciate all your help with this. 

It looks like I don't have something installed with the added ` I get: bash: wget: command not found

is GNU wget what I need?



Offline drax0r

  • Major FANTASTIC Member
  • *******
  • Posts: 3433
  • Muckraker Extraordinaire
    • Anna Texas Community Forum
Re: Need Mac Guru
« Reply #19 on: September 11, 2009, 03:38:52 PM »
Thanks guys I appreciate all your help with this. 

It looks like I don't have something installed with the added ` I get: bash: wget: command not found

is GNU wget what I need?




Yep - do you have fink installed?

Everything I say, do, imply, or infer is the sole representation and responsibility of the individual who owns this account and does not represent the opinion, policy, position, or intent of any organization or other entity, public or private.

Offline ehowton

  • Colonel COURAGEOUS Member
  • *********
  • Posts: 7595
  • Fingering the Muse
    • http://ehowton.livejournal.com
Re: Need Mac Guru
« Reply #20 on: September 11, 2009, 03:41:45 PM »
Once you've installed fink its something like: fink install wget

Ta-da.

Offline Scout

  • Captain Awesome Member
  • ******
  • Posts: 1023
Re: Need Mac Guru
« Reply #21 on: September 11, 2009, 04:08:59 PM »
I really just read this entire thread  

Anything not to clean the Kitchen...Dont tell

Offline Trinity

  • Sr. Member
  • ****
  • Posts: 330
Re: Need Mac Guru
« Reply #22 on: September 11, 2009, 04:09:47 PM »
Me too and I am amazed yet so confused
"Live, Laugh, Love"

Offline Scout

  • Captain Awesome Member
  • ******
  • Posts: 1023
Re: Need Mac Guru
« Reply #23 on: September 11, 2009, 04:11:22 PM »
I like the remote thing. My husband surprises me with crap like that. Mouse goes all wild and what not.

Offline ehowton

  • Colonel COURAGEOUS Member
  • *********
  • Posts: 7595
  • Fingering the Muse
    • http://ehowton.livejournal.com
Re: Need Mac Guru
« Reply #24 on: September 11, 2009, 04:13:33 PM »
Me too and I am amazed yet so confused

Yes, well - as it turns out this thread should've been under 'Dark Arts.'  I'm going to move it now.

Offline Scout

  • Captain Awesome Member
  • ******
  • Posts: 1023
Re: Need Mac Guru
« Reply #25 on: September 11, 2009, 04:25:37 PM »
Hey I read it because I wanted too, not because it was misplaced...carry on guys

Dirty dishes are piling up 8)

Offline filmnazi

  • Full Member
  • ***
  • Posts: 142
  • libertarian whipping boy
Re: Need Mac Guru
« Reply #26 on: September 11, 2009, 04:28:42 PM »


Yes, well - as it turns out this thread should've been under 'Dark Arts.'  I'm going to move it now.

[/quote]

Sorry for posting in the place! I can't believe that I've never lurked in Dark Arts before!

So I got everything installed and it works! Thank you very much for your sage advice! Now to learn the ins and outs of calling shell scripts from applescript.

I'll update the status of my larger project if anyone is interested;)

Offline ehowton

  • Colonel COURAGEOUS Member
  • *********
  • Posts: 7595
  • Fingering the Muse
    • http://ehowton.livejournal.com
Re: Need Mac Guru
« Reply #27 on: September 11, 2009, 04:31:12 PM »
Sorry for posting in the place!

No worries.  We didn't know it belong there until things unfolded the way they did.

Offline drax0r

  • Major FANTASTIC Member
  • *******
  • Posts: 3433
  • Muckraker Extraordinaire
    • Anna Texas Community Forum
Re: Need Mac Guru
« Reply #28 on: September 11, 2009, 04:34:15 PM »

So I got everything installed and it works! Thank you very much for your sage advice! Now to learn the ins and outs of calling shell scripts from applescript.

I'll update the status of my larger project if anyone is interested;)

I don't know much about applescript, but I'd reckon you could put the bash stuff into a file like getweather.sh and then chmod +x that file and then have applescript call "open /path/to/getweather.sh"

You might want to make the first line of your script #!/bin/bash (or the output of the command "which bash") whichever is more accurate. :)
Everything I say, do, imply, or infer is the sole representation and responsibility of the individual who owns this account and does not represent the opinion, policy, position, or intent of any organization or other entity, public or private.

Offline ehowton

  • Colonel COURAGEOUS Member
  • *********
  • Posts: 7595
  • Fingering the Muse
    • http://ehowton.livejournal.com
Re: Need Mac Guru
« Reply #29 on: September 11, 2009, 04:39:21 PM »
cron