I must apologize, those semantics of match() are a peculiarity of GNU awk. The following should work portably, I tested it with an old mawk:
ip -4 -o addr show primary dev eth0 | awk '$3 == "inet" {split($4,i,"/"); print
i[1]; exit}'
Marc
--
_ _ Marc A. Donges +49 721 6904-2130
'v' Klosterweg 28 / E110
/ \ 76131 Karlsruhe
W W http://www.hadiko.de/~marc/
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

