Re: Subnet address

2007-07-23 Thread Mike Frysinger
The answer is: > > > > funny, you just backed up my statement completely. there is no utility > > that'll give you the subnet address straight, you'll need to calculate it > > by hand. > > You're making assumptions about what the OP's question was. > Sp

Re: Subnet address

2007-07-23 Thread Matthew Woehlke
Mike Frysinger wrote: On Saturday 21 July 2007, Archimerged Ark Submedes decided to be rude: On 7/20/07, Mike Frysinger <[EMAIL PROTECTED]> did not read the question. The answer is: funny, you just backed up my statement completely. there is no utility that'll give you the sub

Re: Subnet address

2007-07-21 Thread Mike Frysinger
On Saturday 21 July 2007, Archimerged Ark Submedes decided to be rude: > On 7/20/07, Mike Frysinger <[EMAIL PROTECTED]> did not read the question. > > The answer is: funny, you just backed up my statement completely. there is no utility that'll give you the subnet address s

Re: Subnet address

2007-07-21 Thread Dave Rutherford
On 7/21/07, Archimerged Ark Submedes <[EMAIL PROTECTED]> wrote: On 7/20/07, Mike Frysinger <[EMAIL PROTECTED]> did not read the question. Neither did you. ;-) Asked for was a solution using ifconfig and bash; you added grep and tr. Yes, that's entirely reasonable on your part, but it's not n

Re: Subnet address

2007-07-21 Thread Archimerged Ark Submedes
On 7/20/07, Mike Frysinger <[EMAIL PROTECTED]> did not read the question. The answer is: /sbin/ifconfig eth0 | grep 'inet addr' | tr .: ' ' | (read inet addr a b c d Bcast e f g h Mask i j k l; echo $(($a & $i)).$(($b & $j )).$(( $c & $k )).$(( $d & $l )) ) ___

Re: Subnet address

2007-07-20 Thread Mike Frysinger
On Friday 20 July 2007, Barbarian Mama wrote: > how can know subnet address of the machine using bash scripting .. if i use > ifconfig it only displays ipaddress and subnet mask. I you have to > calculate subnet address then you have to do binary AND operation on > ipaddress AND su

Subnet address

2007-07-20 Thread Barbarian Mama
Hi All, how can know subnet address of the machine using bash scripting .. if i use ifconfig it only displays ipaddress and subnet mask. I you have to calculate subnet address then you have to do binary AND operation on ipaddress AND subnet mask to know subnet address . Can any one help me to