Re: Shell Script Not Working from AppleScript Call
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