The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: reading lines
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-17-2008
c0mrade c0mrade is offline
Registered User
 

Join Date: May 2008
Posts: 18
reading lines

Hi all,

I have a file whose content I need to read and get the 3rd line .. ex:

Code:
one
two
three
What I need is to read a content of third line of this file and print first three characters ... I could print first three characters with "head -c 3" if I could get the content of the third line ... that is what I struggle with.. please help

thank you in advance
Reply With Quote
Forum Sponsor