Get IP

This is a Bash/Shell snippet, talking about getip, ip and ifconfig

Get IP Add to Favorite

ifconfig | sed -n "/en0/,/netmask/ p" | grep "inet " | awk '{print$2}'

copy to .bash_profile: alias getip='ifconfig | sed -n "/en0/,/netmask/ p" | grep "inet " | awk ''{print$2}'''

Created by ThePeppersStudio (46 days, 0.14 hours ago)

Do you want to leave a message? Please login first.