The UNIX and Linux Forums  

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



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-12-2007
ragha81 ragha81 is offline
Registered User
 

Join Date: Jul 2006
Posts: 145
reading each line from a file

hi gurus.. i have a requirement like this...I need to read each line in a file and store it in a variable.. the file is li,e this. i would prefer to construct a loop for this.

1
2
3
4
5
6
7

i need something like this, while (i< last record in file)
x= the first record
do some stuff with x
(i=i+1)

read the next record in the next iteration.

thanks in advance
Reply With Quote
Remove advertisements
!!
Forum Sponsor