#!/bin/bash
# Outputs the VMC address, assuming by default that it is
# connected to eth0; optionally, the NIC ID can be
# specified.
ADAPT="$1"
if [ -z "$ADAPT" ]
then
  ADAPT=eth0
fi
ifconfig $ADAPT | egrep 'inet' | sed -e 's/.*inet\ \ *//g' -e 's/\ .*//g' -e 's/[.][0-9][0-9]*$/.1/g'

