Get Public IP and copy it to Clipboard

/ Published in: Bash
Save to your folder(s)

Copy this code and paste it in your HTML
  1. #!/bin/bash
  2. MYIP=`curl -s '' | sed 's/.*Current IP Address: \([0-9\.\.]*\).*/\1/g'`
  3. echo $MYIP | pbcopy
  4. /usr/local/bin/growlnotify 'IP address copied' -m "Address was: $MYIP"


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.