Re: Directing into a variable doesn't work

2018-06-28 Thread Piotr Grzybowski
hello, I wanted to play around with this idea, and see how it works. Quick and dirty patch (against devel@c181950a89c0f0ca4a3ae2480b783da2f7de9565) is attached. Just modified parser and hardcoded tempfile /tmp/v_save.bash.temp. result: bash-5.0$ echo 'hello a' >>> a; echo $a hello a If you

Re: Directing into a variable doesn't work

2018-06-27 Thread tetsujin
When I initially read this thread, I was concerned about the idea of adding yet another mutation of the redirect syntax. Like how far does this go? Would we introduce a "" someday for some other bit of functionality? Ideally, I think it would be better if this could be done with pipe syntax

Re: Directing into a variable doesn't work

2018-06-25 Thread L A Walsh
Martijn Dekker wrote: Op 24-06-18 om 05:08 schreef Peter Passchier: With memory being abundant and filesystem access expensive, I want to put stdout and stderr of a command into variables (without needing to write to a file): output=$($command 2>>>errors) This would not work even i

Re: Directing into a variable doesn't work

2018-06-25 Thread Peter Passchier
On 06/25/2018 08:11 PM, Chet Ramey wrote: > The answer is ultimately the same as it was last month: > > http://lists.gnu.org/archive/html/bug-bash/2018-05/msg00056.html Oh wow, you replied..! I never got this in my inbox somehow... I guess it is syntactic sugar (although Greg's post shows it isn

Re: Directing into a variable doesn't work

2018-06-25 Thread Chet Ramey
On 6/24/18 11:26 AM, Peter Passchier wrote: > Thank you for the feedback, very insightful. Yes, scratch that first > 'example'. Yay for the here-variable redirection! The answer is ultimately the same as it was last month: http://lists.gnu.org/archive/html/bug-bash/2018-05/msg00056.html -- ``Th

Re: Directing into a variable doesn't work

2018-06-24 Thread Pierre Gaston
On Sun, Jun 24, 2018 at 8:35 PM, Peter Passchier wrote: > On 06/25/2018 12:27 AM, Robert Elz wrote: > > That's not the real issue - rather it is that a here doc is presented to > the > > command beng run as a file descrptior > > OK, thanks, that makes sense. In the case of a here-variable, that w

Re: Directing into a variable doesn't work

2018-06-24 Thread Peter Passchier
On 06/25/2018 12:27 AM, Robert Elz wrote: > That's not the real issue - rather it is that a here doc is presented to the > command beng run as a file descrptior OK, thanks, that makes sense. In the case of a here-variable, that would definitely be the case then. Peter

Re: Directing into a variable doesn't work

2018-06-24 Thread Robert Elz
Date:Sun, 24 Jun 2018 22:26:52 +0700 From:Peter Passchier Message-ID: | I am surprised by the general internal usage of temporary files for | here-documents & here-strings, because (generally speaking) memory is | quite abundant, That's not the real issue - ra

Re: Directing into a variable doesn't work

2018-06-24 Thread Peter Passchier
Thank you for the feedback, very insightful. Yes, scratch that first 'example'. Yay for the here-variable redirection! I am surprised by the general internal usage of temporary files for here-documents & here-strings, because (generally speaking) memory is quite abundant, and here-strings and even

Re: Directing into a variable doesn't work

2018-06-24 Thread Martijn Dekker
Op 24-06-18 om 05:08 schreef Peter Passchier: With memory being abundant and filesystem access expensive, I want to put stdout and stderr of a command into variables (without needing to write to a file): output=$($command 2>>>errors) This would not work even if the feature is implemented. The