Re: Backslash mysteriously disappears in command expansion when unescaping would reference an existing file

2019-05-22 Thread Andreas Kusalananda Kähäri
On Wed, May 22, 2019 at 05:34:22PM +, Charles-Henri Gros wrote: [cut] > The problem I'm trying to solve is to iterate over regex-escaped file > names obtained from a "find" command. I don't know how to make this > work. It works with other versions of bash and with other shells. > > The origin

Re: bash bug - unexpect file deleted using rm command

2019-05-28 Thread Andreas Kusalananda Kähäri
On Tue, May 28, 2019 at 11:56:04AM +, r...@minigeek.srve.com wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTY

Re: bash bug - unexpect file deleted using rm command

2019-05-28 Thread Andreas Kusalananda Kähäri
On Tue, May 28, 2019 at 04:43:42PM +0200, Andreas Kusalananda Kähäri wrote: > On Tue, May 28, 2019 at 11:56:04AM +, r...@minigeek.srve.com wrote: > > Configuration Information [Automatically generated, do not change]: > > Machine: x86_64 > > OS: linux-gnu > > Co

Re: Functions that update themselves

2019-06-03 Thread Andreas Kusalananda Kähäri
On Mon, Jun 03, 2019 at 03:54:59PM +0800, konsolebox wrote: > Hi Chet, > > Do you explicitly allow functions to do this? I just want to know. > > a() { a() { ...; }; a; } > b() { unset -f b; command b "$@"; } > > My current use case for this is to have a function simplify itself > when conditio

Re: declare -g reports as invalid option on MacOS (10.14.6) Bash (5.0.11)

2019-08-31 Thread Andreas Kusalananda Kähäri
On Fri, Aug 30, 2019 at 06:03:37PM -0600, Ray Sutton wrote: > Firstly apologies for not using bashbug, I'm having an issue on a > machine I'm rebuilding and don't have email readily available yet > > The issue is on a late 2013 MBP running MacOS 10.14.6 and > bash -version reports 5.0.11(1)-relea

Re: make install failed; dump core in mkdir

2019-12-02 Thread Andreas Kusalananda Kähäri
rying to create a directory > as a form of mutual exclusion locking. Adding -p breaks that usage > of mkdir. Granted, I find it unlikely that a "make install" operation > would be using mkdir in that highly specific way. But just in general, > altering the basic operations of the core shell utilities is unwise. -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden

Re: Backslash missing in brace expansion

2019-12-08 Thread Andreas Kusalananda Kähäri
tly means "both must be numbers, or both must be characters", but that second part could be made stronger: "both must be characters with the same case". It's obviously far too late to do anything about this at this point in time. -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden

Re: bash 5.0.11 – Output not redirected

2020-02-27 Thread Andreas Kusalananda Kähäri
tally unrelated to whatever shell you happen to be running. -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .

Re: Create an alias on the fly?

2020-03-30 Thread Andreas Kusalananda Kähäri
quot; > exit 1 > fi > > Thanks in advance. This does not seem to be a bug in the bash shell. Maybe you meant to post this the help-bash list? Also, why not just install the prerequisites for the software you're building? -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .

Bug in aclocal.m4 / configure ? BASH_STRUCT_WEXITSTATUS_OFFSET

2020-09-13 Thread Andreas K . Hüttel
s sign makes no sense at all since even on x86-64 sizeof(int)=4 ... [I found this when tracking down weird behaviour in a highly experimental riscv32 / glibc / qemu chroot, where s=10240 ... that's a different bug in another moving piece though...] Best, Andreas -- Andreas K. Hü

Re: Bug in aclocal.m4 / configure ? BASH_STRUCT_WEXITSTATUS_OFFSET

2020-09-14 Thread Andreas K . Hüttel
I observed. Trying to figure out right now whether qemu or glibc (both ~ git master) are at fault... Thanks! -Andreas -- Andreas K. Hüttel dilfri...@gentoo.org Gentoo Linux developer (council, qa, toolchain, base-system, perl, libreoffice) signature.asc Description: This is a digitally signed message part.

Re: find len of array w/name in another var...(bash 4.4.12)

2020-10-20 Thread Andreas Kusalananda Kähäri
an points to an array name. > > Is there a place in the bash manpage that gives an example of using !name > where name points to an array? > > Thanks... > -l > > In bash 4.3+, I would manke your "ar" variable a name reference variable instead: $ ar1=(1 2 3 44) $ declare -n ar=ar1 $ echo "${#ar[@]}" 4 -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .

Re: Checking executability for asynchronous commands

2020-12-25 Thread Andreas Kusalananda Kähäri
ter the > required > check for executability? How would you propose that the shell handle something like the following? ( cmd1 && cmd2 ) & Are you maybe saying cmd & should be a special case? -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .

Re: 'Find' inside loop buggy, incorrectly make up dir.

2021-01-01 Thread Andreas Kusalananda Kähäri
and they can be simplified into -printf "'%p/'\n" and -print "'%p'\n". Unfortunately, it's unclear what it is you really want to achieve, but this is not the list to discuss it as it has nothing to do with bash. You may want to try https://unix.stackexchange.com/ or some similar place instead. -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .

Re: syntax error while parsing a case command within `$(...)'

2021-02-13 Thread Andreas Kusalananda Kähäri
cho $? > 0 > > > On Feb 13, 2021, at 3:36 PM, Alex fxmbsw7 Ratchev wrote: > > > > you have to specify something for ) even when its just a * wildcard > > Oğuz did specify a pattern. It's the second 'x'. > > vq .. but he never had to: % bas

Re: syntax error while parsing a case command within `$(...)'

2021-02-13 Thread Andreas Kusalananda Kähäri
On Sun, Feb 14, 2021 at 12:02:02AM +0100, Andreas Schwab wrote: > On Feb 14 2021, Robert Elz wrote: > > > Date:Sat, 13 Feb 2021 23:21:36 +0300 > > From:=?UTF-8?B?T8SfdXo=?= > > Message-ID: > > > > > > | $ bash -c '

Unable to dereference function-local nameref to global variable of same name

2016-08-10 Thread Andreas Kusalananda Kähäri
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: openbsd6.0 Compiler: cc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='openbsd6.0' -DCONF_MACHTYPE='x86_64-unknown-openbsd6.0' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/sha

Re: Unable to dereference function-local nameref to global variable of same name

2016-08-12 Thread Andreas Kusalananda Kähäri
On Fri, Aug 12, 2016 at 09:34:40AM -0400, Chet Ramey wrote: > On 8/10/16 12:06 PM, Andreas Kusalananda Kähäri wrote: > > > Bash Version: 4.3 > > Patch Level: 46 > > Release Status: release > > > > Description: > > When declaring a variable in a fu

<    4   5   6   7   8   9