Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Perl-alternative' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Perl-alternative
Authored by: unforeseen:X11 on Mar 15, '04 01:58:43PM
I like the Idea of the Script, and since I don't know any applescripting and prefer typing some letters to starting an application hidden elsewhere, I wrote a simple Perl-Script to which I aliased 'net', so typing 'net' in the Shell does the same for me. if someone's interested, here's the code.
#!/usr/bin/perl

# checks for network-availability and quits on success

$sleep = 120;             # in seconds
$url = 'http://www.apple.com';

print "testing...";

while(length `curl --connect-timeout 5 --head --silent $url` 
     

[ Reply to This | # ]