Re: [SLUG] Scripting Question

From: Brian Coyle (brianc@magicnet.net)
Date: Tue Nov 27 2001 - 20:24:05 EST


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

-- 
Linux hank.mjudge.net 2.4.8-24mdk #1 Mon Sep 17 14:22:11 CEST 2001 i586
unknown
  8:15pm  up 27 days, 23:35,  1 user,  load average: 0.02, 0.03, 0.00



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:53:44 EDT