nix, shell, perl, php, mysql and mac os x tips and tricks

Tuesday, March 1, 2005

Parse IP from ifconfig with sed (excluding your internal IP)

/sbin/ifconfig | sed -n -e "s/^.*addr://g" -n -e "s/ Bcast.*//p" | grep -v '192.168.0.20'

No comments:

Post a Comment