Posted By

Juanje on 05/08/08


Tagged

awk


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

AzizLight


Get (just) the IP address in Linux


 / Published in: Bash
 

  1. # get IP address of eth0 network interface
  2. ifconfig eth0 | awk '/inet addr/ {split ($2,A,":"); print A[2]}'

Report this snippet  

You need to login to post a comment.