Steve Kemp <skx@debian.org> writes: > /sbin/ifconfig eth0 | grep "inet addr" | awk '{print $2}'| awk -F: '{print $2}' awk can select the line and do the double split in one go: /sbin/ifconfig eth0 | awk '($0 ~ /^ +inet addr:/) { split($2, a, ":"); print a[2] }' -- ,''`. : :' : Romain Francoise <rfrancoise@debian.org> `. `' http://people.debian.org/~rfrancoise/ `-