The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 04-29-2008
Mr.Aketi Mr.Aketi is offline
Registered User
 

Join Date: Oct 2007
Posts: 7
Hi,

You'll get the same output using the awk. You can also get the output of first words in firstword.txt

your command.... | awk {' print $1'} | tee firstword.txt

For example, if you want to get only the first word in uptime. use

$ uptime | awk {' print $1'}
01:59:45
Reply With Quote