function getip()
{
	echo "Looking for Network IP: $1"
	/sbin/ifconfig ${1:-en0} | awk '/inet addr/ {print $2}' | awk -F: '{print $2}';
}
function mach()
{
	echo -e "\nMachine information:" ; uname -a
	echo -e "\nUsers logged on:" ; w -h
	echo -e "\nCurrent date :" ; date
	echo -e "\nMachine status :" ; uptime
	echo -e "\nMemory status :" ; free
	echo -e "\nFilesystem status :"; df -h
}
function batchexec()
{
	#$1 file to look for
	file=$1
	#$2 command to execute
	#Use all other arguments as command
	cmd=$@
	echo "Looking for file: $file \nRun Command: $cmd"
	find . -type f -iname '*.'${file}'' -exec ${@:2}  {} \; ;
}
batchexec txt ls  -l
exit
getip en1 
#echo mach
#mach

