The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-26-2007
rorey_breaker rorey_breaker is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 20
The cut command. Really simple question!

hi, sorry for asking what I am sure is a really easy question, I am wanting to cut the users real name from the output of 'finger'.

$ cut -f2-3 filename

is in my script but it only seems to cut the first line.

I need to cut the 2nd and 3rd word from each line and store them in variables to echo later.

I have been reading the web for ages, and all suggests the above line of code.

Thanks!