Re: An alias named `done` breaks for loops

2021-08-17 Thread L A Walsh
On 2021/08/14 17:05, Kerin Millar wrote: On Sat, 14 Aug 2021 15:59:38 -0700 George Nachman wrote: This does not constitute a valid test case for two reasons. Firstly, aliases have no effect in scripts unless the expand_aliases shell option is set. 1) I frequently use for loops in

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Greg Wooledge
On Tue, Aug 17, 2021 at 06:03:36PM +0300, Ilkka Virta wrote: > I have this in the configure script: > > if test $ac_compiler_gnu = yes; then > GCC=yes > else > GCC= > fi > > I don't know which part of autoconf exactly generates it. It comes from the AC_PROG_CC macro. On my system, this brin

Re: NL character removed after \\ in command substitution

2021-08-17 Thread Chet Ramey
On 8/16/21 10:28 PM, Haojun Bao wrote: > Bash Version: 5.0 > Patch Level: 3 > Release Status: release > > Description: > > A bug found in parse.y, that will treat reading of COMMAND and > $(COMMAND) differently, despite the info manual saying that: > >> When the old-style backquote form of subs

Re: siglist.c fails to compile for bash-5.1.8 on HP-UX

2021-08-17 Thread Osipov, Michael (LDA IT PLM)
Am 2021-08-17 um 16:36 schrieb Chet Ramey: On 8/17/21 8:03 AM, Osipov, Michael (LDA IT PLM) wrote: Folks, my compiler (aCC) tells me: /opt/aCC/bin/aCC -Ae  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"ia64"' -DCONF_OSTYPE='"hpux11.31"' -DCONF_MACHTYPE='"ia64-hp-hpux11.31"' -DCONF_VENDOR='"hp"' -DLOCAL

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Ilkka Virta
On Tue, Aug 17, 2021 at 5:40 PM Greg Wooledge wrote: > I'm still wondering what issue the OP is actually seeing. If they claim > that changing ${GCC+-stuff} to ${GCC:+-stuff} in some file fixes things, > and if they also claim that *something* is setting the GCC variable to > the empty string ra

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Greg Wooledge
On Tue, Aug 17, 2021 at 07:30:45AM -0700, L A Walsh wrote: > The pairs are about 4 related operations. If you let P = the oPerator > then the odd lines are about ':P' and the even lines are about 'P' (no > colon). > The Pairs from 1-4 are about the operators: '-', '=', '?', '+' > > Pair 4 shows e

Re: siglist.c fails to compile for bash-5.1.8 on HP-UX

2021-08-17 Thread Chet Ramey
On 8/17/21 8:03 AM, Osipov, Michael (LDA IT PLM) wrote: > Folks, > > my compiler (aCC) tells me: >> /opt/aCC/bin/aCC -Ae  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"ia64"' >> -DCONF_OSTYPE='"hpux11.31"' -DCONF_MACHTYPE='"ia64-hp-hpux11.31"' >> -DCONF_VENDOR='"hp"' -DLOCALEDIR='"/opt/ports/share/locale"'

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread L A Walsh
On 2021/08/17 04:02, Osipov, Michael (LDA IT PLM) wrote: Folks, this is basically the same issue as I reported in readline: https://lists.gnu.org/archive/html/bug-readline/2021-08/msg0.html The bad hunk seems not to be POSIX shell compliant. I think your eyes are fooling you. I looke

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Greg Wooledge
On Tue, Aug 17, 2021 at 04:03:17PM +0200, Osipov, Michael (LDA IT PLM) wrote: > Am 2021-08-17 um 15:53 schrieb Greg Wooledge: > > What version of HP-UX? What is the actual error you're getting? > > Latest and greatest: 11.31 v3 > > > I only have access to certain older versions of HP-UX, but I d

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Osipov, Michael (LDA IT PLM)
Am 2021-08-17 um 15:53 schrieb Greg Wooledge: > On Tue, Aug 17, 2021 at 01:02:06PM +0200, Osipov, Michael (LDA IT PLM) wrote: >> this is basically the same issue as I reported in readline: >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.gnu.org%2Farchive%2Fhtml%2Fbug-

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Chet Ramey
On 8/17/21 7:02 AM, Osipov, Michael (LDA IT PLM) wrote: > Folks, > > this is basically the same issue as I reported in readline: > https://lists.gnu.org/archive/html/bug-readline/2021-08/msg0.html > > The bad hunk seems not to be POSIX shell compliant. It is valid POSIX shell code. https:/

Re: Incomplete test for mkdtemp() in lib/sh/tmpfile.c for bash-5.1.8 on HP-UX

2021-08-17 Thread Chet Ramey
On 8/17/21 7:56 AM, Osipov, Michael (LDA IT PLM) wrote: > Folks, > > there is an incomplete macro testing. USE_MKDTEMP is defined in > config-top.h. It's a typo in config-bot.h that was fixed back in March in the devel branch. *** ../bash-5.1-patched/config-bot.h2019-12-10 14:37:43.

Re: RFE: new option affecting * expansion

2021-08-17 Thread Ilkka Virta
On Tue, Aug 17, 2021 at 5:36 AM Dale R. Worley wrote: >cat $( glob * ) > > where glob would get one argument, "*", and output a list of file > names. A glob-by-modification-date program would be a better solution > for this need, IMHO. > So that program would have to duplicate the globbing

Re: bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Greg Wooledge
On Tue, Aug 17, 2021 at 01:02:06PM +0200, Osipov, Michael (LDA IT PLM) wrote: > this is basically the same issue as I reported in readline: > https://lists.gnu.org/archive/html/bug-readline/2021-08/msg0.html As Chet said in that message, you have misinterpreted the POSIX documentation. > The

bash-5.1.8 does not compile anymore on HP-UX due to invalid shell syntax

2021-08-17 Thread Osipov, Michael (LDA IT PLM)
Folks, this is basically the same issue as I reported in readline: https://lists.gnu.org/archive/html/bug-readline/2021-08/msg0.html The bad hunk seems not to be POSIX shell compliant. Both vars are set for me on HP-UX because the expansion is incomplete. According to [1] it has to be $(

siglist.c fails to compile for bash-5.1.8 on HP-UX

2021-08-17 Thread Osipov, Michael (LDA IT PLM)
Folks, my compiler (aCC) tells me: /opt/aCC/bin/aCC -Ae -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"ia64"' -DCONF_OSTYPE='"hpux11.31"' -DCONF_MACHTYPE='"ia64-hp-hpux11.31"' -DCONF_VENDOR='"hp"' -DLOCALEDIR='"/opt/ports/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DHPUX -DTGETENT_BROKEN

Incomplete test for mkdtemp() in lib/sh/tmpfile.c for bash-5.1.8 on HP-UX

2021-08-17 Thread Osipov, Michael (LDA IT PLM)
Folks, there is an incomplete macro testing. USE_MKDTEMP is defined in config-top.h. HAVE_MKDTEMP is properly unset in config.h for HP-UX since it is not available, but tempfile.c does this: #ifdef USE_MKDTEMP filename = (char *)xmalloc (PATH_MAX + 1); tdir = get_tmpdir (flags); tdlen =

Re: RFE: new option affecting * expansion

2021-08-17 Thread Greg Wooledge
On Tue, Aug 17, 2021 at 10:26:21AM +0300, Oğuz wrote: > On Tue, Aug 17, 2021 at 6:31 AM Greg Wooledge wrote: > > An option to change the glob sorting order would actually be useful, > > not for a large number of scripts, but for a very specific problem domain > > where the shell is often used. Is

Re: [Fixed] NL character removed after \\ in command substitution

2021-08-17 Thread Haojun Bao
Here's the patch which I think fixes the problem: diff --git a/parse.y b/parse.y index df1231da..aca8ab62 100644 --- a/parse.y +++ b/parse.y @@ -2616,7 +2616,10 @@ pop_alias: } #endif /* ALIAS || DPAREN_ARITHMETIC */ - if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell

Re: NL character removed after \\ in command substitution

2021-08-17 Thread Haojun Bao
Thank you for the reply. Yes, we can add quotes to EOF, but in these simple reproducing steps, there are no variables. In my real use case, there will be variables, like the following, which makes adding quotes to < wrote: > > On Tue, Aug 17, 2021 at 10:28:16AM +0800, Haojun Bao wrote: > > Config

Re: RFE: new option affecting * expansion

2021-08-17 Thread Oğuz
On Tue, Aug 17, 2021 at 6:31 AM Greg Wooledge wrote: > An option to change the glob sorting order would actually be useful, > not for a large number of scripts, but for a very specific problem domain > where the shell is often used. Is it critically important? No. But it > would be helpful. I