On 11/12/18 6:55 PM, Grisha Levit wrote:
> The following crashes bash:
>
> bash-5.0$ set -u
> bash-5.0$ echo ${!,}
> bash: $!: unbound variable
> bash: !: unbound variable
How does it `crash bash'? There's an extra error message, but it correctly
notes that $! is not set. If the shell is not inte
> How does it `crash bash'?
Sorry, should have specified. I get the following backtrace (but only
after doing the second expansion).
$ env -i $BASH --norc -iuc $'echo ${!,} \n echo ${!,}'; echo $?
bash: $!: unbound variable
bash: !: unbound variable
bash: $!: unbound variable
139
* thread #1, q
The following crashes bash:
bash-5.0$ set -u
bash-5.0$ echo ${!,}
bash: $!: unbound variable
bash: !: unbound variable
bash-5.0$ echo ${!,}
bash: $!: unbound variable
Testing if $! is set also doesn't seem to be possible:
bash-5.0$ echo ${!-}
bash: $!: unbound variable
When an array A has non-zero elements but the expansion of "${A[*]}" is
still
a null string, it is not treated as such for purposes of ${var:-X} expansion
(though $* is treated as null in the same circumstance).
$ A=(''); set -- ''
$ echo "<${A[*]:-X}>" "<${*:-X}>"
<>
$ IFS=
Ok, maybe one day we can do it ...
Thanks for your clarifications
Regards,
Serge.
Le lun. 12 nov. 2018 à 19:09, Chet Ramey a écrit :
> On 11/12/18 12:47 PM, Didou Serge wrote:
> > But not work under linux...
>
> It's probably the difference between using pipes and FIFOs for process
> substitut
On 11/12/18 1:35 PM, Jesse Hathaway wrote:
> On Mon, Nov 12, 2018 at 12:16 PM Chet Ramey wrote:
>> Thanks for the report. This was a bug having to do with the nested
>> pipelines and lastpipe, fixed back in August as the result of
>>
>> https://savannah.gnu.org/support/index.php?109541
>
> Thanks
On 11/12/18 12:47 PM, Didou Serge wrote:
> But not work under linux...
It's probably the difference between using pipes and FIFOs for process
substitution and whether or not the OS makes the underlying file object
seekable.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
On 11/12/18 11:00 AM, Didou Serge wrote:
> I tested with another configuration and ALL work fine:
I don't use cygwin, so I can't verify what's happening. It's probably
that everything is line-buffered, but I can't say for sure.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
On 11/12/18 10:48 AM, Didou Serge wrote:
> Ok, in this case, this should not work either:
>
> mapfile -C xx -c 1 UU < <( echo -e "Premiere ligne" A{1..45} "\nDeuxieme
> ligne" B{1..45} "\nTroisieme ligne" C{1..45})
>
> But, this form work fine.
Because the read function underlying mapfile notes
But not work under linux...
Le lun. 12 nov. 2018 à 17:00, Didou Serge a écrit :
> I tested with another configuration and ALL work fine:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: cygwin
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash.exe
I tested with another configuration and ALL work fine:
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: cygwin
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='x86_64-unknown-cygwin'
-DCON
Ok, in this case, this should not work either:
mapfile -C xx -c 1 UU < <( echo -e "Premiere ligne" A{1..45} "\nDeuxieme
ligne" B{1..45} "\nTroisieme ligne" C{1..45})
But, this form work fine.
Le lun. 12 nov. 2018 à 15:44, Chet Ramey a écrit :
> On 11/11/18 3:32 PM, Didou Serge wrote:
>
> > B
On 11/11/18 3:32 PM, Didou Serge wrote:
> Bash Version: 4.4
> Patch Level: 7
> Release Status: release
>
> Description:
> When use mapfile from normal file that call function that use mapfile, the
> first mapfile lost data.
>
> Repeat-By:
> I create 3 functions:
> ww(){ echo "$@" | mapfile -C yy
On 11/11/18 6:34 AM, John Frankish wrote:
> Using bash-4.4.18
> Intel core i7 laptop running 32-bit or 64-bit linux
> Using gcc-8.2.0
>
> The configure script does not find libncursesw on a system where only the
> wide version of ncurses exists - even when readine is linked against
> ncursesw.
On Sun, Nov 11, 2018 at 09:32:31PM +0100, Didou Serge wrote:
> When use mapfile from normal file that call function that use mapfile, the
> first mapfile lost data.
>
> Repeat-By:
> I create 3 functions:
> ww(){ echo "$@" | mapfile -C yy -c 1 -t TT ; }
In this function, mapfile is being executed
15 matches
Mail list logo