All pastes #370445 Raw Edit

Miscellany

public text v1 · immutable
#370445 ·published 2007-02-24 16:00 UTC
rendered paste body
#!/bin/sh
#latopen
p=0
netstat -laputen 2>/dev/null | while read a b c d e f g h i
do case $d in *.*.*) 
e="'*'"
echo $e | awk '/[0-9]/ tb[1]=$1' 
sleep $p
echo $e | awk '/[0-9]/ { print $1 }' 
sleep $p
echo "info: "${tb0[1]}
#awk -F ':' '{ print $2 }'>/dev/null

#if [ $e != "'*'" ] ; then
#echo "oui" $e
#else
#echo "non" $e
#fi

# 
#echo $a ":" $b ":" $c ":" $d ":" $e ":" $f " : " $g  " : " $h ":" $i
sleep $p
esac
done
IP=$(/sbin/ifconfig | grep "inet adr:192" | cut -d ":" -f2 |cut -d " " -f1)
echo $IP
exit 0