how to show network interface card (NIC) info like IP, netmask
r...i trying to do Configuring the network Script but i always got error asking
./hk.sh: line 18: syntax error near unexpected token `done'
./hk.sh: line 18: `done'
Why? i ready don't know can you help me pls?
#!/bin/bash
options1="\"option 1\" \"option 2\" \"quit\""
echo options $options
eval set $options1
select opt in "$@"
do
echo $options1
if [ "$options1"="option 1" ] ; then
for NIC in /sys/class/net/* ; do
INTERFACE=${NIC##*/} udevadm test --action=add $NIC
done
if [ "$options1"="quit" ] ; then
exit
fi
done
Last edited by tnght2001; 06-23-2010 at 06:13 AM.
|