Re: [SLUG] Scripting Question

From: Paul M Foster (paulf@quillandmouse.com)
Date: Tue Nov 27 2001 - 22:37:48 EST


On Tue, Nov 27, 2001 at 08:24:05PM -0500, Brian Coyle wrote:

> Paul M Foster wrote:
> >
> > Here's what I've got: I want to be able to peel off one line at a time
> > from a file and process just that line, before going on to the next one.
> > I tried something like:
> >
> > cat myfile | while read ; do
> > do_something $REPLY
> > done
> >
> > but it didn't work. I'm trying to avoid awk, sed, perl and such, and
> > only do this in bash.
> >
> > Any clues?
>
> #
> # Reads thru the input file (data_input) and does
> # fun things with the lines...
> #
> while ( read INPUT< data_input )
> do
> echo $INPUT
> done

This enters a continuous loop.

Paul



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:54:09 EDT