• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Shell Script Not Working from AppleScript Call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell Script Not Working from AppleScript Call


  • Subject: Re: Shell Script Not Working from AppleScript Call
  • From: Skeeve <email@hidden>
  • Date: Sun, 24 Aug 2008 14:58:42 +0200

As Axel I also have no wget installed.

As Axel I use curl.

But I prefer perl over sed.

So here is my perlish solution. A bit longer than the sed version from Axel.

my_ip()

on my_ip()
return do shell script "perl -e " & (quoted form of "
use strict;
use warnings;
open my $curl,q(curl http://www.edpsciences.org/htbin/ipaddress |) or die qq/$!\\n/;
SLURP: { local $/;
$_= <$curl>;
}
close $curl;
print $1 if /(\\d{1,3}(?:\\.\\d{1,3}){3})/;
")
end my_ip
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
References: 
 >Shell Script Not Working from AppleScript Call (From: Rick Gordon <email@hidden>)

  • Prev by Date: Re: Hdiutil broken for me
  • Next by Date: Re: Shell Script Not Working from AppleScript Call
  • Previous by thread: Re: Shell Script Not Working from AppleScript Call
  • Next by thread: Re: Shell Script Not Working from AppleScript Call
  • Index(es):
    • Date
    • Thread