Re: 'wait -n' with and without id arguments

2024-08-16 Thread Zachary Santer
On Wed, Aug 14, 2024 at 11:22 PM Zachary Santer wrote: > > The implicit 'jobs' isn't happening before each PS1, but after each > command completes. Thus, all the > > [1] Donerandom_sleep > notifications when sourcing wait-n-failure, before it prints > > 3 processes waited / 8

Re: Question on $@ vs $@$@

2024-08-16 Thread Robert Elz
Date:Thu, 15 Aug 2024 23:33:42 +0200 From:Steffen Nurpmeso Message-ID: <20240815213342.t6-hdjZT@steffen%sdaoden.eu> | I have extended the test a bit, and i also see word split | differences. There are so many problems with this test, that I'm not sure it is worth

Re: Question on $@ vs $@$@

2024-08-16 Thread Steffen Nurpmeso
Hello kre@. Robert Elz wrote in <16443.1723841...@jacaranda.noi.kre.to>: |Date:Thu, 15 Aug 2024 23:33:42 +0200 |From:Steffen Nurpmeso |Message-ID: <20240815213342.t6-hdjZT@steffen%sdaoden.eu> | || I have extended the test a bit, and i also see word split || dif

$@ in function gives error

2024-08-16 Thread freek--- via Bug reports for the GNU Bourne Again SHell
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -f

Re: Question on $@ vs $@$@

2024-08-16 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20240816212216.accse4FG@steffen%sdaoden.eu>: |Hello kre@. | |Robert Elz wrote in | <16443.1723841...@jacaranda.noi.kre.to>: ||Date:Thu, 15 Aug 2024 23:33:42 +0200 ||From:Steffen Nurpmeso ||Message-ID: <20240815213342.t6-hdjZT@steffen%

Re: $@ in function gives error

2024-08-16 Thread Lawrence Velázquez
On Fri, Aug 16, 2024, at 12:59 PM, freek--- via Bug reports for the GNU Bourne Again SHell wrote: > Description: > > Using the following script with a function > > #!/bin/bash > init() { > [ -n "$@" ] && echo $@ > } > init $@ > > and calling the script as follows: > > :~> LC_ALL=C . ./test.sh a b

Re: $@ in function gives error

2024-08-16 Thread Lawrence Velázquez
On Fri, Aug 16, 2024, at 6:29 PM, Lawrence Velázquez wrote: > There is no problem with "$@" or functions here. The "problem" is > that "$@" expands to multiple fields when there are two or more > positional parameters, so (as the error message says) you end up > running test(1) with too many argum

Re: $@ in function gives error

2024-08-16 Thread Greg Wooledge
On Fri, Aug 16, 2024 at 18:59:15 +0200, freek--- via Bug reports for the GNU Bourne Again SHell wrote: > #!/bin/bash > init() { > [ -n "$@" ] && echo $@ > } > init $@ You have multiple errors in this script. The first error is that you used $@ without quotes, twice. If you want to preserve the