get your global ip from myglobalip.com


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



Copy this code and paste it in your HTML
  1. #! /bin/bash
  2.  
  3. whereto=/home/andreas/devel/snipporama/shell_scripts/comic
  4. file=$(wget -O- http://www.myglobalip.com 2>/dev/null | grep "<h2>" | cut -d":" -f2)
  5.  
  6. echo ${file:1:${#file}-6}

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.