Re: Conditions with logical operators and nested groups execute "if" and "else"

2018-05-21 Thread Pierre Gaston
On Tue, May 22, 2018 at 12:17 AM, Uriel wrote: > Configuration Information: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' > -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/s

Conditions with logical operators and nested groups execute "if" and "else"

2018-05-21 Thread Uriel
Configuration Information: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I

Re: Editing previous lines while in here-document mode (<

2018-05-21 Thread Chet Ramey
On 5/21/18 4:40 AM, Garreau, Alexandre wrote: > Hi, > > Not only because this is often frustrating and impractical, but also > because this tends to cause inconsistency feeling, I think it would be > useful I if you could go in the previous lines (with the left key, or > C-p keystroke, or somethin

Re: Redirect to variable

2018-05-21 Thread Greg Wooledge
On Mon, May 21, 2018 at 10:12:43AM -0400, Chet Ramey wrote: > On 5/20/18 10:21 PM, PePa wrote: > > I would like to do something like this, where output gets redirected > > into a variable: > > > > some-command >>> variablename1 2>>>variablename2 > > > > command-with-many-output-descriptors >>> va

Re: Redirect to variable

2018-05-21 Thread Chet Ramey
On 5/20/18 10:21 PM, PePa wrote: > I would like to do something like this, where output gets redirected > into a variable: > > some-command >>> variablename1 2>>>variablename2 > > command-with-many-output-descriptors >>> var1 3>>> var3 4>>> var4 > > The idea is not needing files to be created bu

Re: Variables can’t contain NUL

2018-05-21 Thread Chet Ramey
On 5/21/18 8:37 AM, Greg Wooledge wrote: > If you're looking for some deeper answer, like "Why did Stephen Bourne > write it this way back in 1977?" then I would hazard a guess along the > lines of "It is tightly coupled to the underlying C argument-passing > interface which uses NUL-terminated st

Re: [PATCH] A terminating signal has to complete a bash process

2018-05-21 Thread Eduardo Bustamante
It's in commit 96b7e26874047647e85bd5c7e71a7f664174c2cc, in the `devel' branch of the git repository. On Mon, May 21, 2018 at 12:42 AM, Andrei Vagin wrote: > Hello Chet, > > Have you had a chance to try this patch? Let me know if you will have > any questions. > > Thanks, > Andrei > > On Thu, May

Re: Variables can’t contain NUL

2018-05-21 Thread Greg Wooledge
On Sun, May 20, 2018 at 04:56:48AM +0200, Garreau, Alexandre wrote: > On 2015-11-13 at 07:17, Greg Wooledge wrote: > > Actually in the most general case, where those output streams may > > contain NUL bytes, it requires two temp files, because you can't store > > arbitrary data streams in bash vari

Editing previous lines while in here-document mode (<

2018-05-21 Thread Garreau, Alexandre
Hi, Not only because this is often frustrating and impractical, but also because this tends to cause inconsistency feeling, I think it would be useful I if you could go in the previous lines (with the left key, or C-p keystroke, or something alike) while writting several lines after a here-documen