SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Linux OS.: Technical questions

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Mitch Blevins who wrote (290)2/4/2002 9:20:02 AM
From: Thomas A Watson  Read Replies (2) of 484
 
Great stuff Mitch, thanks again.
A one line command.
rm Status.htm ;wget --http-user="" --http-passwd=******** --dot-style=text; 192.168.1.1 ; html_parse -f Status.htm -o Status ; cat Status |head -20 |tail -1 # extract just the 20th line.

The prob is that the IP address is on it's own line and finding it needs a multiline id to extract. Or I could assume Status is fixed size thus use a static line count.

cat Status |head -20 |tail -1

output of the html parse.
cat Status
#
STATUS

This screen displays the router's current status and settings. This information is read-only.
#
#
Host Name:
#
Firmware Version:
1.37, Jan 03 2001
#
Login:
#

#
LAN:
(MAC Address: 00-04-5A-20-34-6B)
#
IP Address:
192.168.1.1
#
Subnet Mask:
255.255.255.0
#
DHCP server:
Disabled
#
#
WAN:
(MAC Address: 00-04-5A-20-34-6C)
#
IP Address:
64.252.112.6
#
Subnet Mask:
255.255.254.0
#
Default Gateway:
0.0.0.0
#
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext