The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: Some Info.
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-29-2008
ad4m88 ad4m88 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 8
Some Info.

Hiya all ... i am a newbie to UNIX,

Just want to knwo what this command does:
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'

I think, 'grep shows the line with 'inet addr' (which is the 2nd line, displaying the IP Address, Broadcast Address and Subnet Mask) ... Is this correct?

What does the Second part do? {cut -d: -f2}?

Thanks in advance.

Kind Regards
ad4m88