#!/bin/bash
#########################################################
#                                                       #
# This is BashStyle-NG 7.3                           #
#                                                       #
# Licensed under GNU LESSER GENERAL PUBLIC LICENSE v3   #
#                                                       #
# Copyright 2007 - 2008 Christopher Bratusek            #
#                                                       #
#########################################################

if [[ $1 != "" ]]; then
	LANG=C /sbin/ifconfig $1 | grep 'inet addr:' | cut -d: -f2 | gawk '{ print $1}'
else	LANG=C /sbin/ifconfig  | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 | gawk '{ print $1}'
fi
