[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 11:33:23 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
rleeden <rleeden@blueyonder.co.uk> wrote:
> NOTE: This is just an example, so I don't need alternatives for how I could
> achieve the specifics shown above. I need to find a good solution where I
> can do things with a file (whether it be with sed, awk, tail, head etc.)
> then pipe it into a 'while read' loop, and then after the loop access any
> variables set within the while loop.
Can you explain what was unsatisfactory about the alternatives given
in the FAQ, so we have a better idea of what would be acceptable?
Here's one possibility:
... | { while ...; do var=...; done; use "$var"; }
paul
Re: while read subcommand problem, Kevin F. Quinn, 2007/03/02