On Thu, May 28, 2020 at 03:12:47PM -0700, Keith Thompson wrote:
> I see this problem on copies of bash 5.0.16 and 5.0.17 built from
> sourced on Ubuntu 20.04 LTS. It does *not* occur with the /bin/bash
> GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu)
> provided by the distribution.
It's a subtle point. See this paragraph in the bash manual page:
If there is a command name left after expansion, execution
proceeds as described below. Otherwise, the command exits. If
one of the expansions contained a command substitution, the exit
status of the co
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -Wno-parentheses -Wno-format-security
uname output: Linux bomb20 5.4.0-31-generic #35-Ubuntu SMP Thu May 7
20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Machine
Let's say I want to glob just the files with names starting with dots,
but not the ubiquitous dot and dot-dot entries, which are seldom a
useful result of a glob.
That can be done with something like ..?* .[!.]* or .!(|.) with
extglob. Both are still a bit annoying to type, and it woul
On Thu, May 28, 2020 at 08:02:18AM +0100, Laurent Picquet wrote:
> function aFunction {
> local aVar="$(somethingThatFails)" || { echo "is expected to go there";
> return 1; }
> }
"local" is a command with its own separate exit status. It masks
the exit status of the command substitution.
Ru
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_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE