diff --git a/whatismyip b/whatismyip index c521f3f..9bc7c52 100755 --- a/whatismyip +++ b/whatismyip @@ -1,13 +1,5 @@ -#!/usr/bin/env ruby +#!/bin/sh +# +# could be an alias but I'll leave it here anyway -require 'open-uri' - -open('http://whatismyip.com') do |f| - puts "Open failed: #{f.status.inspect}" unless f.status.first == "200" - # WhatIsMyIP.com - 207.81.136.119 - title = f.gets while title !~ /WhatIsMyIP\.com - (\d[\d.]+)</ - ip = $1.chomp - ENV['SHELL'] = '/bin/bash' - `echo -n "#{ip}" | pbcopy` - puts ip -end +curl http://www.whatismyip.com/automation/n09230945.asp