Re: RFE: new option affecting * expansion

2021-08-16 Thread Robert Elz
Date:Mon, 16 Aug 2021 22:35:12 -0400 From:"Dale R. Worley" Message-ID: <875yw4yf1b@hobgoblin.ariadne.com> | Back in the old, old days, there was a program named "glob" that did | pathname expansions. That's correct. But: | So you wouldn't say | |c

Re: NL character removed after \\ in command substitution

2021-08-16 Thread Andreas Kusalananda Kähäri
On Tue, Aug 17, 2021 at 08:32:35AM +0200, Kusalananda Kähäri wrote: > On Tue, Aug 17, 2021 at 10:28:16AM +0800, Haojun Bao wrote: > > Configuration Information [Automatically generated, do not change]: > > Machine: x86_64 > > OS: linux-gnu > > Compiler: gcc > > Compilation CFLAGS: -g -O2 > > -fdebu

Re: GROUPS

2021-08-16 Thread Robert Elz
Date:Mon, 16 Aug 2021 22:16:29 -0400 From:"Dale R. Worley" Message-ID: <878s10yfwi@hobgoblin.ariadne.com> | What seems to be the case with sh-style shells and Posix is that | all-caps variable names are subject to implementation-specific use, and | so users

Re: NL character removed after \\ in command substitution

2021-08-16 Thread Andreas Kusalananda Kähäri
On Tue, Aug 17, 2021 at 10:28:16AM +0800, Haojun Bao wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 > -fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=. > -fstack-protector-strong -Wformat -We

NL character removed after \\ in command substitution

2021-08-16 Thread Haojun Bao
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname out

Re: RFE: new option affecting * expansion

2021-08-16 Thread Greg Wooledge
On Mon, Aug 16, 2021 at 10:35:12PM -0400, Dale R. Worley wrote: > Back in the old, old days, there was a program named "glob" that did > pathname expansions. So you wouldn't say > >cat * > > you'd say > >cat $( glob * ) Tcl still does it that way. Not with that syntax, but the command

Re: RFE: new option affecting * expansion

2021-08-16 Thread Dale R. Worley
"Chris F.A. Johnson" writes: > It would be nice if there were an option to allow * to expand sorted > by timestamp rather than aphabetically. Generally, a new option is not a good way to accomplish this, as an option has global effects and can cause other parts of the code to malfunction. Back i

Re: GROUPS

2021-08-16 Thread Dale R. Worley
It seems to me that people are avoiding both the core issue and its solution. A standard is what allows people to write software that can be ported without having to reassess every detail of the program. To take C as an example, the standard defines what identifiers look like, which identifiers a

Re: Issue declaring an array via a variable name

2021-08-16 Thread Chet Ramey
On 8/14/21 8:45 PM, Hunter Wittenborn wrote: > Hi, > > > > I was doing some testing for some additions to a rather big Bash script I'm > working on, and the following code kept failing whenever I attempted to run > it: > > > > " > > variable="hello" > > > > declare -g "${variable}"=("wo

Re: "printf -v foo bar" sets $? to 1

2021-08-16 Thread Chet Ramey
On 8/14/21 7:56 PM, Keith Thompson wrote: > Bash Version: 5.1 > Patch Level: 4 > Release Status: maint > > Description: > The builtin "printf" command with the "-v" option works > correctly, but it reports failure by setting $? to 1. Thanks for the report. Chet -- ``The lyf so

Re: An alias named `done` breaks for loops

2021-08-16 Thread Ilkka Virta
On Sun, Aug 15, 2021 at 2:00 AM George Nachman wrote: > Defining an alias named `done` breaks parsing a for loop that does not have > an `in word` clause. > alias done="" > Works for me: $ set -- a b c $ alias done='echo hi; done' $ for x do done hi hi hi Not that I think it's a good idea to