#!/bin/sh
ostype=`echo $OSTYPE | awk '/^darwin/ {print "darwin"}'`
if [ "$ostype" = "darwin" ]
then
	/sbin/ifconfig | grep '\<inet\>' | cut -f2 -d' ' | cut -f1 -d' '
else
        /sbin/ifconfig | grep 'inet addr' | cut -f2 -d':' | cut -f1 -d' '
fi

