GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Operating System  >  Shell Scripting
Go To First  |  Previous Question  |  Next Question 
 Shell Scripting  |  Question 33 of 44    Print  
How to extract the second row of a text-file?

  
Total Answers and Comments: 3 Last Update: July 09, 2007     Asked by: Ralf Krauseman 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 10, 2007 17:59:28   #1  
gto mitbbs        

RE: How to extract the second row of a text-file?
tail +2 <filename> | head -1
 
Is this answer useful? Yes | No
June 20, 2007 10:06:54   #2  
Subramanyam        

RE: How to extract the second row of a text-file?
head -2 filename|tail -1
 
Is this answer useful? Yes | No
July 09, 2007 10:57:37   #3  
aamer123        

RE: How to extract the second row of a text-file?
 sed -n '2p' datafile
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape