SOLUTION: errexit does not exit script in subshells

2008-01-31 Thread Michael Potter
ot really care for this solution. I hope someone will comment with a graceful solution. -- Michael Potter On Jan 31, 2008 11:43 AM, Michael Potter <[EMAIL PROTECTED]> wrote: > Bash Bunch, > > Not surprisingly, bash does not exit the script when an error is detected > in a subs

Re: errexit does not exit script in subshells

2008-02-01 Thread Michael Potter
ON". Hopefully someone will point out a more graceful solution. -- potter On Feb 1, 2008 1:56 PM, Linda Walsh <[EMAIL PROTECTED]> wrote: > > > Michael Potter wrote: > > Bash Bunch, > > > > Not surprisingly, bash does not exit the script when an error is detected in

broken pipe

2008-02-13 Thread Michael Potter
find in my real script. I just used that here so anyone could reproduce the problem. -- Michael Potter

[bash-3.2.39] race condition on AIX when using libtool with bash

2008-07-30 Thread Michael Haubenwallner
ltmain.sh - GNU libtool 1.5.26 (1.1220.2.493 2008/02/01 16:58:18) # # Please DO NOT delete this file! # It is necessary for linking the library. # Name of the PIC object. # Name of the non-PIC object. non_pic_object=none Thoughts? Thanks! /haubi/ -- Michael Haubenwallner Gentoo on a different level

Re: [bash-3.2.39] race condition on AIX when using libtool with bash

2008-07-31 Thread Michael Haubenwallner
On Wed, 2008-07-30 at 18:53 +0200, Michael Haubenwallner wrote: > Now I can see (stripped the unimportant): > open("GetWMCMapW.loT", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE) = 4 > kfcntl(4, 14, 0x0001) = 1 > close(4)= 0 >

Re: [bash-3.2.39] race condition on AIX when using libtool with bash

2008-08-04 Thread Michael Haubenwallner
On Wed, 2008-07-30 at 18:53 +0200, Michael Haubenwallner wrote: > Hi, > > have some strange race condition here on aix5.3 with bash-3.2.39, when > using CONFIG_SHELL=/path/to/bash, building in parallel (-j16) with > libtool. It works when using /bin/ksh. Now it has happened wi

Declaring variables as local effects command status $?

2009-02-06 Thread Michael Rendell
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPAC

Re: Declaring variables as local effects command status $?

2009-02-07 Thread Michael Rendell
Hi, On Friday 06 February 2009 17:02, Paul Jarc wrote: > Michael Rendell wrote: > > local x=$( echo hi; exit 20); > > ret=$? > > Here you're getting the exit status of "local" itself, which is 0. If > you want the exit status of the comma

Bash script file naming problem?

2009-07-25 Thread michael rice
Is there a problem with naming a bash script file "script"? I'm using Fedora 11. Michael [mich...@localhost ~]$ bash --version GNU bash, version 4.0.23(1)-release (i386-redhat-linux-gnu) [mich...@localhost ~]$ cat ./bin/temp #!/bin/bash # Sample shell script echo "The

functions can be created with dotted name but not removed

2009-12-04 Thread Michael O'Donnell
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='

functions can be created with dotted name but not removed

2009-12-04 Thread Michael O'Donnell
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='

Re: Here document and stdin?

2010-09-23 Thread Michael Witten
On Sun, Aug 15, 2010 at 19:55, Mike Frysinger wrote: > On Sun, Aug 15, 2010 at 8:47 PM, Peng Yu wrote: >> cat file.txt | sqlite3 main.db < > you only get 1 stdin ... either via the pipe or the heredoc.  give > everything you want to the first cat and worry about sqlite only > consuming the pipe. >

Re: Bash style of if-then-else?

2010-09-23 Thread Michael Witten
On Mon, Aug 23, 2010 at 16:40, Eric Blake wrote: > On 08/23/2010 03:29 PM, Peng Yu wrote: >> >> Hi, >> >> I'm wondering if there is a widely accepted coding style of bash scripts. >> >> lug.fh-swf.de/vim/vim-bash/StyleGuideShell.en.pdf >> >> I've seen the following style. Which is one is more wide

Re: Bash style of if-then-else?

2010-09-24 Thread Michael Witten
On Fri, Sep 24, 2010 at 03:22, Marc Herbert wrote: >> On Thu, Sep 23, 2010 at 04:38:42PM -0500, Michael Witten wrote: >>> This is also possible: >>> >>> [ -f "$file" ] && do_something > > Note that this style is not compatible with se

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-02 Thread Michael Wardle
Hi Chet Thanks for your very prompt reply. I understand that globbing is happening, but I don't understand why deleting a parameter should occur with nullglob set if the parameter matches but the word to delete doesn't. The bash behavior seems to make this construct useful only for file name del

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-02 Thread Michael Wardle
${USER}' > $ echo $connectioninfo > ${USER} Actually, this seems similar to the following: $ shopt -s nullglob $ echo $USER michael $ var='${USER}".*"' $ typeset -p var declare -- var="\${USER}\".*\"" $ echo $var $ echo "$var" ${USER}&quo

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-02 Thread Michael Wardle
On Sat, 2005-07-02 at 12:24 -0400, Chet Ramey wrote: > Michael Wardle wrote: > > Hi Chet > > > > Thanks for your very prompt reply. > > > > I understand that globbing is happening, but I don't understand why > > deleting a parameter should occur with n

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-05 Thread Michael Wardle
I've come to a better understanding of how expansion occurs and now realize that this is not a bug. Thanks to Chet for his time in responding to my messages. ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Fwd: Question

2017-09-05 Thread Saint Michael
Dear Maintainer Is there a commercial or free software that can take a Bash script and transparently turn it into a C executable, provided the machines where it runs has any of the external commands like awk, etc? Something like a Java virtual machine, for Shell. I think this language is powerful

Re: Question

2017-09-11 Thread Saint Michael
can generate solutions and also protect our intellectual property. I am not smart enough to write it, but somebody will. Yours Federico On Mon, Sep 11, 2017 at 2:54 PM, Bob Proulx wrote: > Saint Michael wrote: > > Dear Maintainer > > Note that I am not the maintainer. &

make distclean breaks "later "configure && makes"", i.e., removes a file in distro that a build needs (cannot process parse.y)

2018-02-14 Thread Michael Felt
I can down the distribution, e.g. ftp://ftp.gnu.org/gnu/bash/bash-4.4.18.tar.gz, unpack it, goto base directory and run configure. Thought I had reported this earlier, but guess not! If after a successful build, I run "make distclean" - "./configure && make"  no longer works. e.g.: root@x0

Re: make distclean breaks "later "configure && makes"", i.e., removes a file in distro that a build needs (cannot process parse.y)

2018-02-14 Thread Michael Felt
I'll start all over again - using the following structure: cd dist; wget distro..tar.gz cd ../src; gzip -dc ../dist/distro.tar.gz | tar xf - mkdir ../distro; cd ../distro ../src/distro/configure --arguments; make; make distclean ../src/distro/configure --arguments; make As I have not been bu

make distclean and bash-4.4 - FYI

2018-10-31 Thread Michael Felt
stall yacc, which is what make is complaining about now - but I also wonder if I could have avoided this by trying to build oot (out of tree). Is this supported, or even recommended? Thanks for a great product! Michael

Re: make distclean and bash-4.4 - FYI

2018-10-31 Thread Michael Felt
On 10/31/2018 9:03 PM, Michael Felt wrote: > Hi, > > I finally got around to patching and packaging bash-4.4.23 and had to > run a "make distclean" because I had copied the old version and without > the make distclean make kept looking for "bashversion"

Re: make distclean and bash-4.4 - FYI

2018-11-01 Thread Michael Felt
> On 10/31/2018 9:24 PM, Chet Ramey wrote: >> On 10/31/18 3:03 PM, Michael Felt wrote: >> Hi, >> >> I finally got around to patching and packaging bash-4.4.23 and had to >> run a "make distclean" because I had copied the old version and without

Re: make distclean and bash-4.4 - FYI

2018-11-01 Thread Michael Felt
> On 10/31/2018 9:31 PM, Chet Ramey wrote: >> On 10/31/18 3:13 PM, Michael Felt wrote: >> >> Running "make test", and I amy have forgotten something I did in the past. >> a) running tests as root (initially) >> b) ends with: >> run-vredir >&g

Re: make distclean and bash-4.4 - FYI

2018-11-01 Thread Michael Felt
> On 11/1/2018 12:43 PM, Michael Felt wrote: >>> I am mainly surprised by "process file table is full" - is there >>> something specific I can do to look at this more closely? >> No, it's expected. That script tests the behavior when the process&#x

bash 5.0 dies with HISTSIZE=0

2019-02-20 Thread Michael Albinus
, including HISTSIZE=0. The second line, after the "#$ " prompt, starts a shell function declaration. The third and fourth line belong to this shell function. After the fourth line, bash dies. The exit code is 139. The same scenario, but with HISTSIZE=1, works proper. Best regards, Michael.

Re: bash 5.0 dies with HISTSIZE=0

2019-02-21 Thread Michael Albinus
; > Thanks for the report. Try the attached patch and see if that fixes the > crash. Thanks a lot, your patch fixes the problem. > Chet Best regards, Michael. PS: Could you pls give me a bug number or something like this, that I can reference to?

Re: bash 5.0 dies with HISTSIZE=0

2019-02-21 Thread Michael Albinus
Greg Wooledge writes: > Bash doesn't use a formal bug tracking system. Chet manages it all > by hand. Your best bet is to find the list archive copy of this thread, > and bookmark it. (Start at <http://lists.gnu.org/archive/html/bug-bash/>.) I see, thanks! Best regards, Michael.

Re: bash 5.0 dies with HISTSIZE=0

2019-02-21 Thread Michael Albinus
y several GNU projects use debbugs.gnu.org, which runs Debian's BTS software. > Chet Best regrds, Michael.

Re: bash 5.0 dies with HISTSIZE=0

2019-02-22 Thread Michael Albinus
w bugs every single day. I, for example, am subscribed to the Emacs bugs. There are much more open bug reports I'd like to see ... Best regards, Michael.

Possible Bug in command and type posix compliance

2019-04-04 Thread Michael S
Hello, I believe I have found a bug when using the posix compliant bash. From this page point 53 https://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html it states that type and command should not return a binary that is non executable. For most cases this is currently true and the

Re: Possible Bug in command and type posix compliance

2019-04-05 Thread Michael S
.c and I'll add some additional logic to not add to the hash table in this case. Thanks, On Fri, Apr 5, 2019 at 11:00 AM Chet Ramey wrote: > On 4/5/19 2:28 AM, Michael S wrote: > > Hello, > > > > I believe I have found a bug when using the posix compliant bash. From &g

execve E2BIG (Argument list too long)

2020-09-30 Thread Michael Green
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/li

Re: execve E2BIG (Argument list too long)

2020-10-01 Thread Michael Green
e: > > On 9/30/20 3:12 AM, Michael Green wrote: > > > Bash Version: 5.0 > > Patch Level: 17 > > Release Status: release > > > > Description: > > > > The included short script when run with the following command results > > in execve "

issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-15 Thread Michael Felt
Hi. I don't actually use bash myself - so something that would be apparent to a bash user is invisible to me. As part of the packaging of bash-5.0.18 (i.e., 5.0 at patch level 18) I ran the test suite. a) is there a flag I can pass so that it ignores the UTF-8 tests? I do not want to not build U

Re: issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-15 Thread Michael Felt
> 2 > $ ulimit -n 6 > $ ulimit -n > 6 > $ exec $ exit > root@x065:[/data/prj/gnu/bash/bash-5.0.18] > > ``` > > As you can see by the return of the original PS1 - the sub-shell > (./bash) 'crashed' -- I did not type 'exit' - that is a result of the > 'exec > Hope this helps, > > Michael (aka aixtools). > > > >

Re: issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-16 Thread Michael Felt
On 15/10/2020 16:11, k...@plushkava.net wrote: > On 15/10/2020 08:03, Michael Felt wrote: > >> $ exec > $ exit >> root@x065:[/data/prj/gnu/bash/bash-5.0.18] >> >> ``` >> >> As you can see by the return of the original PS1 - the sub-shell >> (./b

Re: issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-16 Thread Michael Felt
On 15/10/2020 16:21, Chet Ramey wrote: > On 10/15/20 3:03 AM, Michael Felt wrote: >> Hi. >> >> I don't actually use bash myself - so something that would be apparent >> to a bash user is invisible to me. >> >> As part of the packaging of bash-5.0.1

Re: issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-16 Thread Michael Felt
10/15/20 3:03 AM, Michael Felt wrote: >>> Hi. >>> >>> I don't actually use bash myself - so something that would be apparent >>> to a bash user is invisible to me. >>> >>> As part of the packaging of bash-5.0.18 (i.e., 5.0 at patch level 18)

Re: issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-24 Thread Michael Felt
test for AIX. If not, we can consider this thread 'closed'. Sincerely, Michael On 16/10/2020 15:16, Chet Ramey wrote: > On 10/16/20 6:31 AM, Michael Felt wrote: > >> OK. While - perhaps the root cause is differences in error-codes, or >> something like that - and not t

History search: wrong pos. after `Bksp` over typo

2020-11-10 Thread Michael Allan
stepwise over a search term, reverting at each step to a previous value, revert the search position to *its* correponding, previous value. -- Michael Allan Toronto, +1 416 699 9528 http://reluk.ca/

Request to the mailing list

2020-12-27 Thread Saint Michael
I want to suggest a new feature, that may be obvious at this point. How do I do this? Philip Orleans

New Feature Request

2020-12-27 Thread Saint Michael
Bash is very powerful for its ability to use all kinds of commands and pipe information through them. But there is a single thing that is impossible to achieve except using files on the hard drive or on /tmp. We need a new declare -g (global) where a variable would have its contents changed by subs

Re: New Feature Request

2020-12-27 Thread Saint Michael
-level developer. My days coding assembler are long gone. Philip Orleans Reference: https://tldp.org/LDP/tlk/ipc/ipc.html On Sun, Dec 27, 2020 at 12:50 PM Eli Schwartz wrote: > On 12/27/20 12:38 PM, Saint Michael wrote: > > Bash is very powerful for its ability to use all

Re: New Feature Request

2021-01-04 Thread Saint Michael
In this case, how do I quickly increase the number stored in "foo"? the file has 1 as content, and I have a new value to add to it quickly. Is there an atomic way to read,add, write a value to "foo"? On Mon, Jan 4, 2021 at 8:15 AM Greg Wooledge wrote: > On Fri, Jan 01, 2021 at 10:02:26PM +0

Re: New Feature Request

2021-01-04 Thread Saint Michael
can you point me to your FAQ? On Mon, Jan 4, 2021 at 8:39 AM Greg Wooledge wrote: > On Mon, Jan 04, 2021 at 08:26:59AM -0500, Saint Michael wrote: > > In this case, how do I quickly increase the number stored in "foo"? > > the file has 1 as content, and I have

Re: Feature Request: scanf-like parsing

2021-01-22 Thread Saint Michael
I vote for this new feature. On Fri, Jan 22, 2021 at 9:16 AM Chet Ramey wrote: > On 1/22/21 12:29 AM, William Park wrote: > > > But, if data are buried in a mess, then it's very labour-intensive to > > dig them out. It might be useful to have scanf()-like feature, where > > stdin or string are

Re: Issue with patching from bash-4.3-patches

2014-10-05 Thread Michael Felt
I am using patch 2.7.0 - and I get the warnings about dangerous files (what is a dangerous file I ask myself) - but patching proceeds without any problems. Michael On Thu, Oct 2, 2014 at 11:09 PM, Chet Ramey wrote: > On 9/30/14, 2:18 PM, Matthew Gessner wrote: > > I apologize, but

How to monitor bash variables periodically

2015-01-26 Thread Michael Mehari
u understand my difficulties and i am glad if someone help with it. Best regards, Michael

Re: Bash-4.4-beta available for FTP

2015-10-23 Thread Michael Felt
I do not mind installing yacc :) How about the redefine of mbchar_t ? On Fri, Oct 23, 2015 at 2:45 PM, Chet Ramey wrote: > On 10/22/15 3:47 PM, aixtools wrote: >> On 2015-10-15 16:23, Chet Ramey wrote: >>> The first beta release of bash-4.4 is now available with the URL >>> >>> ftp://ftp.cwru.ed

Lower case construction does not working properly

2015-11-24 Thread Michael Kazakov
Hellol. I have founded a bug in variable manipulation behavior of bash version 4.2.53. Constructions ${parameter,pattern} and ${parameter,,pattern} does not working properly: michael@kazakov:~> VAR=COLORADO michael@kazakov:~> echo ${VAR,c} COLORADO michael@kazakov:~> echo ${VAR,,o}

Command substitution starting with a (()) expression should fail

2016-01-31 Thread Michael Diamond
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' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPA

Re: Bash-4.4-beta available for FTP

2016-02-25 Thread Michael Felt
h", line 47.22: 1506-334 (S) Identifier mbchar_t has already been defined on line 175 of "../src/bash-4.4/include/shmbchar.h". make: 1254-004 The error code from the last command is 1. This is from a build done from the beta release from 24 hours ago. Michael On Mon, Oct 26, 2015

Non-expanding here-documents inside command substitution are subject to newline joining

2017-02-10 Thread Michael Homer
Bash has an unusual behaviour when a non-expanding here-document (<<‘EOT’) is used inside $(…) command substitution. Newline joining occurs within the document when it would not if the same document were not inside a command substitution, while other shells do not perform it in either case. Thi

segmentation fault after interrupting function that uses "time"

2024-05-23 Thread Michael Maurer
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux nb 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_

REQUEST

2024-06-04 Thread Saint Michael
> > It's time to add floating point variables and math to bash. It just makes so much easier to solve business problems without external calls to bc or Python. Please let's overcome the "shell complex". Let's treat bash a real language.

Re: REQUEST - bash floating point math support

2024-06-05 Thread Saint Michael
the most obvious use of floating variables would be to compare balances and to branch based on if a balance is lower than a certain value I use: t=$(python3 -c "import math;print($balance > 0)") and the if [ "$t" == "False" ];then echo "Result <= 0 [$t] Client $clname $clid Balance $balance" fi The

Re: REQUEST - bash floating point math support

2024-06-05 Thread Saint Michael
I think that we should do this in the shell. I mean. It will get done at some point, in the next decades or centuries. Why not do it now? Let's compile some C library or allow inline C On Wed, Jun 5, 2024, 2:12 PM Greg Wooledge wrote: > On Wed, Jun 05, 2024 at 01:31:20PM -0400, Saint

Re: REQUEST - bash floating point math support

2024-06-12 Thread Saint Michael
I think that we should go ahead and do it. On Wed, Jun 12, 2024, 5:06 PM Zachary Santer wrote: > On Thu, Jun 6, 2024 at 6:34 AM Léa Gris wrote: > > > > Le 06/06/2024 à 11:55, Koichi Murase écrivait : > > > > > Though, I see your point. It is inconvenient that we cannot pass the > > > results of

Re: REQUEST - bash floating point math support

2024-06-14 Thread Saint Michael
Great idea. On Fri, Jun 14, 2024 at 3:18 AM Léa Gris wrote: > > Le 14/06/2024 à 03:41, Martin D Kealey écrivait : > > On Thu, 13 Jun 2024 at 09:05, Zachary Santer wrote: > > > >> > >> Let's say, if var is in the form of a C floating-point literal, > >> ${var@F} would expand it to the locale-depe

Question that baffles AI (all of them)

2024-06-15 Thread Saint Michael
in this code: data="'1,2,3,4','5,6,7,8'" # Define the processing function process() { echo "There are $# arguments." echo "They are: $@" local job="$1" shift local a="$1" shift local b="$1" shift local remaining="$*" echo "Arg1: '$a', Arg2: '$b'" } process "$dat

Re: REQUEST - bash floating point math support

2024-06-21 Thread Saint Michael
Anybody else with the knowledge to tackle this? I am not capable of even writing C code correctly. On Fri, Jun 21, 2024 at 4:22 PM Chet Ramey wrote: > > On 6/21/24 3:59 PM, alex xmb sw ratchev wrote: > > > > If floating point math support is added to bash, I would expect it to > > > be

Fwd: New feature

2024-10-12 Thread Saint Michael
From: Saint Michael Date: Sat, Oct 12, 2024 at 9:49 AM Subject: New feature The command printf needs a new flag, -e, that would mimic that way the same flag works with echo. After using printf, right now I need to lunch a second command if I need to expand the \n into real new lines

history bug: new shell separates lines from the history file

2024-11-21 Thread Michael Tosch
Hello, I want to file a bug in bash. Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-11 Thread Michael Felt (aixtools)
 Sent from my iPhone > On 11 Mar 2021, at 18:15, Chet Ramey wrote: > > On 3/11/21 11:28 AM, Michael Felt wrote: >> Hi, >> Issue: AdoptOpenJDK build process makes bash calls in a particular way. An >> abbreviated (shorter pathnames) example is: >> ``` >&

Re: bash conditional expressions

2021-11-12 Thread Michael J. Baars
Yeeh, that's funny indeed :) Now this: time ( test2Y=$(stat -c %Y test2); for (( i=0; i<1024; i++ )); do if (( $(stat -c %Y test1) < ${test2Y} )); then echo >> /dev/null; else echo >> /dev/null; fi; done; ); real0m4.503s user0m1.048s sys 0m3.240s time ( for (( i=0; i<1024; i++ ));

Re: bash conditional expressions

2021-11-17 Thread Michael J. Baars
On Mon, 2021-11-15 at 09:23 -0500, Chet Ramey wrote: > On 11/12/21 4:36 AM, Mischa Baars wrote: > > > Could you please restore the Fedora 32 behaviour? Someone must have read > > the bash manual a little too precise, because now the statement only > > returns true when a 'touch -a test' is given a

Re: bash conditional expressions

2021-11-17 Thread Michael J. Baars
On Fri, 2021-11-12 at 19:48 +0100, Andreas Schwab wrote: > FILE1 -nt FILE2 True if file1 is newer than file2 (according to >modification date). > > Andreas. > This would indeed also solve the problem at hand :)

Re: bash conditional expressions

2021-11-17 Thread Michael J. Baars
On Wed, 2021-11-17 at 14:06 +0200, Ilkka Virta wrote: > On Wed, Nov 17, 2021 at 1:33 PM Andreas Schwab wrote: > > On Nov 17 2021, Michael J. Baars wrote: > > > > > > > > > When -N stands for NEW, and touch (-am) gives you a new file > > > > >

Re: bash conditional expressions

2021-11-17 Thread Michael J. Baars
On Fri, 2021-11-12 at 19:48 +0100, Andreas Schwab wrote: > FILE1 -nt FILE2 True if file1 is newer than file2 (according to >modification date). > > Andreas. > So now we have a relation for 'older than' and for 'newer than', but how about 'oldest' (executable), and

Defaults when cross-compiling

2023-11-06 Thread Michael T. Kloos
I was trying to cross-compile bash for musl libc.  The configure script reports: checking for working sbrk... configure: WARNING: cannot check working sbrk if cross-compiling yes However, I don't believe musl libc supports sbrk. However, autoconf seems to default to assuming yes and sets the H

Re: Defaults when cross-compiling

2023-11-08 Thread Michael T. Kloos
It seems to me that Autoconf (configure) is making some bad choices if it is just guessing that support exists like that, especially when it has a guaranteed fallback.  It's job is to setup the build for the target host system.  I was able to fix the build by using --without-bash-malloc.  Simpl

Combining test flags inside [[ ]] produces unexpected results and no error message.

2007-07-26 Thread Michael A. Smith
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' - -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'

Bug in [ -d ... ] ?

2017-11-02 Thread Michael F Gordon
c Linux 7 and it happens with the latest release on both. This is a simplified version of some code from a Cadence setup script; the above behaviour causes it to fail on SL7. Michael Gordon -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

Re: Bug in [ -d ... ] ?

2017-11-02 Thread Michael F Gordon
k, but something has changed in newer versions of the shell - the unquoted version if [ -d ${FOO:=""} ]; then echo yes; else echo no; fi gives "yes" on 4.2 onwards but "no" on 4.1. Also, replacing := with :- gives "no" on both versions when unquoted or unqu

Re: issues in bash found while creating command result display

2019-04-16 Thread Michael Felt (aixtools)
Sent from my iPhone > On 17 Apr 2019, at 01:37, Paul Wise wrote: > >> On Tue, 2019-04-16 at 14:57 -0400, Chet Ramey wrote: >> >> Why take so much effort to (imperfectly) figure out and display >> things you already know? > > Correctness. If what the user knows You mean think they know, bett

Unexpected parse error in function definition involing grouping braces and redirections

2015-06-16 Thread Michael Le Barbier Grünewald
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: darwin14.3.0 Compiler: /usr/bin/clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='d\ arwin14.3.0' -DCONF_MACHTYPE='x86_64-apple-darwin14.3.0' -DCONF_VENDOR='apple' \ -DLOCALEDIR

Re: Unexpected parse error in function definition involing grouping braces and redirections

2015-06-16 Thread Michael Le Barbier Grünewald
Hi Greg, thank you for your answer! > On 16 Jun 2015, at 14:58, Greg Wooledge wrote: > > On Tue, Jun 16, 2015 at 01:56:31PM +0200, Michael Le Barbier Grünewald wrote: >> 1>&2 { >>printf "$@" >>printf '\n' &g

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)
w. Note: this pontentionally applies to USE_MKSTEMP/HAVE_MKSTEMP as well. Michael

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

2021-08-17 Thread Osipov, Michael (LDA IT PLM)
f int sh_builtin_func_t PARAMS((WORD_LIST *)); /* sh_wlist_func_t */ ^ "general.h", line 323: error #2020: identifier "WORD_DESC" is undefined extern int check_identifier PARAMS((WORD_DESC *, int)); ^ 5 errors detected in the compilation of "siglist.c". gmake: *** [Makefile:101: siglist.o] Error 2 Weird. I have added #include "command.h" right after chartypes.h in general.h Known issue? Platform-specific? Michael

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)
$(GCC:+..} and not $(GCC+..}. I have changed ./configure locally and it works with /bin/sh. I assume that this should also work on any other POSIX compliant shell. Michael [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

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%2Farchi

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"&#x

[REGRESSION] Incorrect libcurses detection in 5.2.15 (on HP-UX)

2023-08-18 Thread Osipov, Michael (IN IT IN)
ote that libcurses links to libxcurses. Michael

<    1   2