using grep to find IP address...
balgach_at_gmail.com
Date: 05/31/05
- Next message: Bill Marcum: "Re: Case statement"
- Previous message: William: "Re: Case statement"
- Next in thread: Greg Beeker: "Re: using grep to find IP address..."
- Reply: Greg Beeker: "Re: using grep to find IP address..."
- Reply: Thorn: "Re: using grep to find IP address..."
- Reply: Ed Morton: "Re: using grep to find IP address..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 May 2005 08:30:41 -0700
Hello all, i am interested in the last 255 bits of the local machines
ip address (aka the last number after the period) so far ive been
using the command, i know all the ip address start with 192.168
ifconfig | grep '192.168' | awk '{print $2}'
which is returning:
inet addr:192.168.0.20
now how do i get it just to return the '20' ??
thanks.
Cheers,
Adam.
- Next message: Bill Marcum: "Re: Case statement"
- Previous message: William: "Re: Case statement"
- Next in thread: Greg Beeker: "Re: using grep to find IP address..."
- Reply: Greg Beeker: "Re: using grep to find IP address..."
- Reply: Thorn: "Re: using grep to find IP address..."
- Reply: Ed Morton: "Re: using grep to find IP address..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]