[NTLUG:Discuss] another bash question ... I/O

Ken Frazer frazer at acm.org
Fri Mar 1 16:34:52 CST 2002


Fred,
You could try something like this:

#!/bin/sh
while read animal color
do
         read  name </dev/tty
         echo $name $animal $color > outfile
done <infile

Regards,
krf

At 10:30 AM 2/27/2002 -0600, you wrote:
>Actually, this is an extension of my first question, but maybe it is 
>better expressed.
>
>I need to read from a text file, solicit user input for each item found in 
>that file, and then write it all out to a second text file.  I suppose I 
>could just do it in C, but if possible I should like to do it in bash.
>
>Any suggestions or guidance would be appreciated.
>
>--
>...make every program a filter...
>
>
>_______________________________________________
>http://www.ntlug.org/mailman/listinfo/discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ntlug.org/pipermail/discuss/attachments/20020301/47f60223/attachment.html


More information about the Discuss mailing list