[Ilugc] [OFFTOPIC]Unix Shell Script

  • From: jujubha@xxxxxxxxx (Jujubha)
  • Date: Tue, 27 Aug 2002 12:21:17 -0400

There is a while construct for the shell.

read is bash built in function which can read a line from stdin.
but it only takes space delimited data

#!/bin/sh

while read var1 var2
do
    echo $var1 $var2
done

This might help you reach EOF as an example, I would rather prefer you 
to write a small perl script

jrameshkumar@xxxxxxxxxxxxxxxxx wrote:

I would like to check the situation of EOF .Consider a situation where i am
displaying certain  records from a flat file ..

Thanks,

- Ramesh




                                                                              
                                    
                   Jujubha                                                    
                                    
                   <jujubha@yaho        To:     
jrameshkumar@xxxxxxxxxxxxxxxxx                                    
                   o.com>               cc:     ilugc@xxxxxxxxxxxxxxxxxx      
                                    
                                        Subject:     Re: [Ilugc] 
[OFFTOPIC]Unix Shell Script                      
                   23/08/2002                                                 
                                    
                   08:17 PM                                                   
                                    
                                                                              
                                    
                                                                              
                                    




jrameshkumar@xxxxxxxxxxxxxxxxx wrote:

 

Hi
How do we check end of file (EOF) in shell Script.

- Ramesh



   

???

Where do you want to do this? and how do you want to do this









 






Other related posts: