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


if [[ $1 == *help* || $1 == "" ]]; then
	echo -e "$(bs-ng-parse-echo $white)Usage: $(bs-ng-parse-echo $green)showip$(bs-ng-parse-echo $orange) [interface]\
	\n\n$(bs-ng-parse-echo $iceblue)[interface] is something like eth0 or ppp1"
elif [[ $1 != "" ]]; then
	LANG=C /sbin/ifconfig $1 | grep 'inet addr:' | cut -d: -f2 | gawk '{ print $1}'
fi
