Hi all,

I've got this piece of shell script:
Code:
# Set up array for all IP addresses
IPADDRS=""
COUNTER=0

for EACH in `ifconfig -a`; do
	# Look for four sets of grouped numbers separated by periods. 
	# Groups are between 1 and 3 digets in size and consist of numbers only.
	IPADDRS[$COUNTER]=`echo $EACH | egrep [0-9]\{1,3\}"\."[0-9]\{1,3\}"\."[0-9]\{1,3\}"\."[0-9]\{1,3\}`
	
	# Increment counter
	COUNTER=$(( $COUNTER + 1 ))
done
It should look through the output of `ifconfig -a` and place IP addresses into the IPADDRS array. It did work...But now it doesn't, but I'm not sure why...
Even if I strip out the array stuff, it's not echo'ing the IP addresses...

I'm using OpenSolaris 2009.06 for this particular project. The same expression works on my Mac though...

Any ideas?
Thanks,
Ben