|
From: | Angel |
Subject: | Re: Code for :"Re: HERE document failed && Re: /dev/fd/62: No such file or directory" |
Date: | Tue, 29 Jul 2014 23:27:23 +0200 |
Greg Wooledge wrote: > The 'read' example will not work as you've written it. The change to > the shell variable 'out' will be lost when the pipeline terminates. > (But you can get a very recent bash release and set the "lastpipe" > shopt to work around this.) > > If the while loop also tries to set shell variables, then it will have > the same problem (and the same possible workaround). You are right. Turns out I didn't reset the variable between tests. Or you can put the inside-code into brackets :)
[Prev in Thread] | Current Thread | [Next in Thread] |