Posted By

xxtjaxx on 11/05/09


Tagged

ipinternetbash


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

thastyle


get your global ip from myglobalip.com


 / Published in: Bash
 

  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  

You need to login to post a comment.