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
21
inxi
21
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.6.0-b1-t8
|
||||
#### version: 0.6.0-b1-t9
|
||||
#### Date: November 20 2008
|
||||
########################################################################
|
||||
#### 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()
|
||||
{
|
||||
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:
|
||||
if [[ -n $( which lynx ) ]];then
|
||||
browser='lynx'
|
||||
elif [[ -n $( which links2 ) ]];then
|
||||
browser='links2'
|
||||
# first find a browser to use, these all support -dump
|
||||
for browser in $browsers
|
||||
do
|
||||
if [[ -n $( which $browser ) ]];then
|
||||
use_browser=$browser
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n $browser ]];then
|
||||
ip=$( $browser -dump techpatterns.com/ip | awk -F 'is: ' '{
|
||||
if [[ -n $use_browser ]];then
|
||||
ip=$( $use_browser -dump techpatterns.com/ip | awk -F 'is: ' '{
|
||||
#gsub("\n","",$2")
|
||||
print $2
|
||||
}' )
|
||||
|
|
Loading…
Reference in a new issue