Posted By

mcarneiro on 07/24/10


Tagged

mac


Versions (?)

get ip


 / Published in: Bash
 

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

Report this snippet  

You need to login to post a comment.