Help for this page

Select Code to Download


  1. or download this
    host=$(ifconfig | perl -e ' while (<>) { $_ =~ /inet addr:(10.[\d.]+)/
    +; $host = `nslookup $1`; }; $host =~ /name = ([\S]+)./; print $1;')
    
  2. or download this
    ip=`ifconfig | perl -ne ' $_ =~ /inet addr:(10.[\d.]+)/ and print $1`
    host=`nslookup $ip | perl -ne '/name = ([\S]+)./; print $1;'`