[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: while read subcommand problem
From: |
Paul Jarc |
Subject: |
Re: while read subcommand problem |
Date: |
Fri, 02 Mar 2007 12:11:11 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
Richard van der Leeden <rleeden@blueyonder.co.uk> wrote:
> The examples in the FAQ do work for the their examples, but I can't figure
> out a clean way to implement it with a while loop when reading in lines from
> the output of a piped command(s).
The redirection applied to "read" in those examples would be applied
to your while loop instead. For example:
while ...; do var=...; done <<EOT
$(generate-input-for-while)
EOT
use "$var"
paul
Re: while read subcommand problem, Kevin F. Quinn, 2007/03/02