ia64/xen-unstable

view tools/internal/xi_helper @ 522:07cb518caf2f

bitkeeper revision 1.289 (3f09877bT-kkJTOM1WvHevpN2wY-qw)

Prune old code
author rac61@labyrinth.cl.cam.ac.uk
date Mon Jul 07 14:45:15 2003 +0000 (2003-07-07)
parents 316a46d203dd
children 4778f77eb1bf
line source
1 #!/bin/bash
3 if [ -z "$QUERY_DEV" ] ; then QUERY_DEV=eth0 ; fi
5 if [ "$1" = "ip" ] ; then
6 /sbin/ifconfig $QUERY_DEV | grep 'inet addr' | tr ':' '\t' | awk '{ print $3}';
7 fi
9 if [ "$1" = "mask" ] ; then
10 /sbin/ifconfig $QUERY_DEV | grep 'Mask' | tr ':' '\t' | awk '{print $7}';
11 fi
13 if [ "$1" = "route" ] ; then
14 /sbin/route -n | grep $QUERY_DEV | grep 'G' | awk '{print $2}'
15 fi