mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added more browsers to ip test
This commit is contained in:
parent
ff58282b96
commit
e853fed8ff
23
inxi
23
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.6.0-b1-t8
|
#### version: 0.6.0-b1-t9
|
||||||
#### Date: November 20 2008
|
#### Date: November 20 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
||||||
|
@ -1789,17 +1789,20 @@ get_networking_data()
|
||||||
|
|
||||||
get_networking_wan_ip_data()
|
get_networking_wan_ip_data()
|
||||||
{
|
{
|
||||||
local extras_data='' ip='' browser=''
|
local extras_data='' ip='' use_browser='' browser=''
|
||||||
|
local browsers='elinks links links2 lynx w3m'
|
||||||
|
|
||||||
# first find a client to use:
|
# first find a browser to use, these all support -dump
|
||||||
if [[ -n $( which lynx ) ]];then
|
for browser in $browsers
|
||||||
browser='lynx'
|
do
|
||||||
elif [[ -n $( which links2 ) ]];then
|
if [[ -n $( which $browser ) ]];then
|
||||||
browser='links2'
|
use_browser=$browser
|
||||||
fi
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [[ -n $browser ]];then
|
if [[ -n $use_browser ]];then
|
||||||
ip=$( $browser -dump techpatterns.com/ip | awk -F 'is: ' '{
|
ip=$( $use_browser -dump techpatterns.com/ip | awk -F 'is: ' '{
|
||||||
#gsub("\n","",$2")
|
#gsub("\n","",$2")
|
||||||
print $2
|
print $2
|
||||||
}' )
|
}' )
|
||||||
|
|
Loading…
Reference in a new issue