Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-19 Thread Steffen Nurpmeso
Hello Robert. Thanks again for your extensive answers. Robert Elz wrote in <2675.1726728...@jacaranda.noi.kre.to>: |Date:Thu, 19 Sep 2024 00:45:44 +0200 |From:Steffen Nurpmeso |Message-ID: <20240918224544.aXWgbZu-@steffen%sdaoden.eu> | || Woops. I did not know

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-19 Thread Chet Ramey
On 9/19/24 2:42 AM, Robert Elz wrote: Date:Thu, 19 Sep 2024 00:45:44 +0200 From:Steffen Nurpmeso Message-ID: <20240918224544.aXWgbZu-@steffen%sdaoden.eu> | Woops. I did not know that, i always separate {} at the beginning | an the end, yet not (). '(' and

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Robert Elz
Date:Thu, 19 Sep 2024 00:45:44 +0200 From:Steffen Nurpmeso Message-ID: <20240918224544.aXWgbZu-@steffen%sdaoden.eu> | Woops. I did not know that, i always separate {} at the beginning | an the end, yet not (). '(' and ')' (parentheses) are operators, '{' and '}'

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Steffen Nurpmeso
Robert Elz wrote in <5996.1726697...@jacaranda.noi.kre.to>: |Date:Wed, 18 Sep 2024 23:05:06 +0200 |From:Steffen Nurpmeso |Message-ID: <20240918210506.9rRUe2TG@steffen%sdaoden.eu> | || I am totally surprised they all swallow this code, there is no || separating w

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Robert Elz
Date:Wed, 18 Sep 2024 23:05:06 +0200 From:Steffen Nurpmeso Message-ID: <20240918210506.9rRUe2TG@steffen%sdaoden.eu> | I am totally surprised they all swallow this code, there is no | separating whitespace in between the ; and the } which closes the | function --

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Steffen Nurpmeso
Chet Ramey wrote in : |On 9/18/24 1:05 AM, Oğuz wrote: |> On Wed, Sep 18, 2024 at 4:19 AM Steffen Nurpmeso \ |> wrote: |> It boils down to this: |> |>f(){ echo $#;}; set "" "" ""; IFS=x; f $* |> |> bash, NetBSD and FreeBSD sh, and ksh88 all agree and print 2. pdksh |> prints 3 but

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Steffen Nurpmeso
Robert Elz wrote in <3946.1726671...@jacaranda.noi.kre.to>: ... || On Wed, Sep 18, 2024 at 08:05:10 +0300, Oğuz wrote: ||> It boils down to this: ||> f(){ echo $#;}; set "" "" ""; IFS=x; f $* | ||> bash, NetBSD and FreeBSD sh, and ksh88 all agree and print 2. pdksh ||> prints 3 but mksh

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Steffen Nurpmeso
Oğuz wrote in : |On Wed, Sep 18, 2024 at 4:19 AM Steffen Nurpmeso \ |wrote: |> | |It boils down to this: In this case, ok .. i have not spent time trying to vaporise it. I haved added this standalone thing to my tests. | f(){ echo $#;}; set "" "" ""; IFS=x; f $* | |bash, NetBSD and Fre

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Robert Elz
Date:Wed, 18 Sep 2024 07:21:30 -0400 From:Greg Wooledge Message-ID: | On Wed, Sep 18, 2024 at 08:05:10 +0300, Oğuz wrote: | > It boils down to this: | > f(){ echo $#;}; set "" "" ""; IFS=x; f $* | > bash, NetBSD and FreeBSD sh, and ksh88 all agree and pri

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Chet Ramey
On 9/18/24 1:05 AM, Oğuz wrote: On Wed, Sep 18, 2024 at 4:19 AM Steffen Nurpmeso wrote: It boils down to this: f(){ echo $#;}; set "" "" ""; IFS=x; f $* bash, NetBSD and FreeBSD sh, and ksh88 all agree and print 2. pdksh prints 3 but mksh and oksh print 1. dash, ksh93, yash, and zsh pri

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-18 Thread Greg Wooledge
On Wed, Sep 18, 2024 at 08:05:10 +0300, Oğuz wrote: > On Wed, Sep 18, 2024 at 4:19 AM Steffen Nurpmeso wrote: > > > > It boils down to this: > > f(){ echo $#;}; set "" "" ""; IFS=x; f $* > > bash, NetBSD and FreeBSD sh, and ksh88 all agree and print 2. pdksh > prints 3 but mksh and oksh print

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-17 Thread Oğuz
On Wed, Sep 18, 2024 at 4:19 AM Steffen Nurpmeso wrote: > It boils down to this: f(){ echo $#;}; set "" "" ""; IFS=x; f $* bash, NetBSD and FreeBSD sh, and ksh88 all agree and print 2. pdksh prints 3 but mksh and oksh print 1. dash, ksh93, yash, and zsh print 0.

Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-17 Thread Steffen Nurpmeso
Hello. I am terribly sorry to be here once again; i already mentioned on bug-bash@ the problem with IFS being reverse solidus that dash (and myself) has (have). I came back to this for my one again, and i stumble over one additional difference in behaviour in between (myself and) bash, dash and bu

Re: Question on $@ vs $@$@

2024-08-29 Thread Steffen Nurpmeso
Dear Robert, i am totally distracted regarding this topic. I will carefully read it and the standard again. (We also have likely the last midsommer week here, and i am out whenever i can.) Thanks for taking the time to look that deeply into this issue. Robert Elz wrote in <12813.1724902...@jacara

Re: Question on $@ vs $@$@

2024-08-29 Thread Chet Ramey
On 8/28/24 11:41 PM, Robert Elz wrote: The reason all this is messy, is that it is (more or less) the way it was implemented in the original Bourne shell. That tells you that the implementation must be simple - the rules might seem complex to explain, but the implementation is sure to be simpl

Re: Question on $@ vs $@$@

2024-08-28 Thread Robert Elz
Date:Wed, 28 Aug 2024 02:03:54 +0200 From:Steffen Nurpmeso Message-ID: <20240828000354.qZaQvm7v@steffen%sdaoden.eu> | That confuses me again, unfortunately i got a bug report and | distracted. I mean, i would | | 1. skip leading whitespace anyhow (IFS or not,

Re: Question on $@ vs $@$@

2024-08-27 Thread Steffen Nurpmeso
Robert Elz wrote in <14146.1724799...@jacaranda.noi.kre.to>: |Date:Tue, 27 Aug 2024 22:02:34 +0200 |From:Steffen Nurpmeso |Message-ID: <20240827200234.95X76_wN@steffen%sdaoden.eu> | | || Any character in IFS delimits a field, adjacent IFS whitespace || char

Re: Question on $@ vs $@$@

2024-08-27 Thread Robert Elz
Date:Tue, 27 Aug 2024 22:02:34 +0200 From:Steffen Nurpmeso Message-ID: <20240827200234.95X76_wN@steffen%sdaoden.eu> | Any character in IFS delimits a field, adjacent IFS whitespace | characters are then ignored. Not quite. Any sequence of any amount of IFS

Re: Question on $@ vs $@$@

2024-08-27 Thread Steffen Nurpmeso
Chet Ramey wrote in : |On 8/26/24 8:21 PM, Steffen Nurpmeso wrote: |> Chet Ramey wrote in |> : |>|On 8/23/24 5:47 PM, Steffen Nurpmeso wrote: |>|> If IFS has a value other than the default, then sequences of the |>|> whitespace characters space, tab, and newline are ignored at the |>|

Re: Question on $@ vs $@$@

2024-08-27 Thread Chet Ramey
On 8/26/24 8:21 PM, Steffen Nurpmeso wrote: Chet Ramey wrote in : |On 8/23/24 5:47 PM, Steffen Nurpmeso wrote: |> If IFS has a value other than the default, then sequences of the |> whitespace characters space, tab, and newline are ignored at the |> beginning and end of the word,

Re: Question on $@ vs $@$@

2024-08-26 Thread Steffen Nurpmeso
Lawrence Velázquez wrote in <972ac206-a601-4337-8dfc-77bbaef22...@app.fastmail.com>: |On Sat, Aug 24, 2024, at 10:08 PM, Steffen Nurpmeso wrote: |> One hopefully last thing in this regard for me, ... |This easily obfuscates the structure of the "$@" expansion. You'd |be better off with somet

Re: Question on $@ vs $@$@

2024-08-26 Thread Steffen Nurpmeso
alex xmb sw ratchev wrote in : |try | |${@@Q} | |and | |${*@Q} | |greets I try to avoid using non-portable shell stuff. I do not think these would be understood by the ash shell variants (and ksh) which had results other than bash. --steffen | |Der Kragenbaer,The moon be

Re: Question on $@ vs $@$@

2024-08-26 Thread Steffen Nurpmeso
Chet Ramey wrote in : |On 8/23/24 5:47 PM, Steffen Nurpmeso wrote: |> If IFS has a value other than the default, then sequences of the |> whitespace characters space, tab, and newline are ignored at the |> beginning and end of the word, as long as the whitespace |> character is in the

Re: Question on $@ vs $@$@

2024-08-26 Thread Steffen Nurpmeso
Dear Robert, all. Robert Elz wrote in <39.1724620...@jacaranda.noi.kre.to>: |Date:Sun, 25 Aug 2024 04:08:58 +0200 |From:Steffen Nurpmeso |Message-ID: <20240825020858.nrX4pFTm@steffen%sdaoden.eu> | || (The only thinkable answer is that the step that my MUA does,

Re: Question on $@ vs $@$@

2024-08-26 Thread alex xmb sw ratchev
try ${@@Q} and ${*@Q} greets On Wed, Aug 14, 2024, 2:45 AM Steffen Nurpmeso wrote: > Hello. > > I include bug-bash even though i think bash is correct, but there > lots of people of expertise are listening, so, thus. > Sorry for cross-posting, nonetheless. > Given this snippet (twox() withou

Re: Question on $@ vs $@$@

2024-08-26 Thread Chet Ramey
On 8/24/24 11:49 PM, Lawrence Velázquez wrote: The bash manual says [1]: * ($*) Expands to the positional parameters, starting from one. When the expansion is not within double quotes, each positional parameter expands to a

Re: Question on $@ vs $@$@

2024-08-26 Thread Chet Ramey
On 8/23/24 5:47 PM, Steffen Nurpmeso wrote: If IFS has a value other than the default, then sequences of the whitespace characters space, tab, and newline are ignored at the beginning and end of the word, as long as the whitespace character is in the value of IFS (an IFS whitespace cha

Re: Question on $@ vs $@$@

2024-08-25 Thread Robert Elz
Date:Sun, 25 Aug 2024 04:08:58 +0200 From:Steffen Nurpmeso Message-ID: <20240825020858.nrX4pFTm@steffen%sdaoden.eu> | (The only thinkable answer is that the step that my MUA does, | namely resolving $* as a single string first, does not happen, | right? That's

Re: Question on $@ vs $@$@

2024-08-24 Thread Lawrence Velázquez
On Sat, Aug 24, 2024, at 11:49 PM, Lawrence Velázquez wrote: > Correct. Since you're using $* unquoted in a context where field > splitting is performed, the shell does not expand it to a single > field. That is, unless there's a single positional parameter that is not further split. -- vq

Re: Question on $@ vs $@$@

2024-08-24 Thread Lawrence Velázquez
On Sat, Aug 24, 2024, at 10:08 PM, Steffen Nurpmeso wrote: > One hopefully last thing in this regard for me, > > c() { echo "$# 1<$1> 2<$2> 3<$3> *<$*> @<$@>"; } This easily obfuscates the structure of the "$@" expansion. You'd be better off with something like this, which prints each positiona

Re: Question on $@ vs $@$@

2024-08-24 Thread Steffen Nurpmeso
Robert Elz wrote in <26326.1724474...@jacaranda.noi.kre.to>: |Date:Fri, 23 Aug 2024 23:47:06 +0200 |From:Steffen Nurpmeso |Message-ID: <20240823214706.oskn9OEF@steffen%sdaoden.eu> | || So IFS whitespace only if part of $IFS. | |That is the definition of IFS whi

Re: Question on differences on quoted $* (Was: Re: Question on $@ vs $@$@)

2024-08-24 Thread Steffen Nurpmeso
Greg Wooledge wrote in : |On Sat, Aug 24, 2024 at 02:15:48 +0200, Steffen Nurpmeso wrote: |> a() { |> echo $#,1=$1,2=$2,"$*",$*, |>} | |You didn't read a word I said, did you I recognize that i did not get your email even though i was in Cc:. |*Sigh.* --End of --steffen | |De

Re: Question on differences on quoted $* (Was: Re: Question on $@ vs $@$@)

2024-08-24 Thread Steffen Nurpmeso
Emanuele Torre wrote in : |On Sat, Aug 24, 2024 at 02:15:48AM +0200, Steffen Nurpmeso wrote: |> Sorry but i really have to come again, i do not understand what is |> going on, and *i* think shell is at fault. | |No. It is working correctly. | |> This: |> |> a() { |> echo $#,1=$1,2

Re: Question on $@ vs $@$@

2024-08-24 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20240825013311.B3Z3QcNn@steffen%sdaoden.eu>: |Robert Elz wrote in | <26326.1724474...@jacaranda.noi.kre.to>: ||Date:Fri, 23 Aug 2024 23:47:06 +0200 ||From:Steffen Nurpmeso ||Message-ID: <20240823214706.oskn9OEF@steffen%sdaoden.eu> ||

Re: Question on differences on quoted $* (Was: Re: Question on $@ vs $@$@)

2024-08-23 Thread Robert Elz
Date:Sat, 24 Aug 2024 02:33:26 +0200 From:Emanuele Torre Message-ID: | No. It is working correctly. It is indeed. | This $1 is unquoted, it will be split. You need to use "$1" if you don't | want it to split. Alternatively, make a() be a() {

Re: Question on $@ vs $@$@

2024-08-23 Thread Robert Elz
Date:Fri, 23 Aug 2024 23:47:06 +0200 From:Steffen Nurpmeso Message-ID: <20240823214706.oskn9OEF@steffen%sdaoden.eu> | So IFS whitespace only if part of $IFS. That is the definition of IFS whitespace. | So this "adjacent" even if *not* part of $IFS. No, only cha

Re: Question on differences on quoted $* (Was: Re: Question on $@ vs $@$@)

2024-08-23 Thread Greg Wooledge
On Sat, Aug 24, 2024 at 02:15:48 +0200, Steffen Nurpmeso wrote: > a() { > echo $#,1=$1,2=$2,"$*",$*, > } You didn't read a word I said, did you *Sigh.*

Re: Question on differences on quoted $* (Was: Re: Question on $@ vs $@$@)

2024-08-23 Thread Emanuele Torre
On Sat, Aug 24, 2024 at 02:15:48AM +0200, Steffen Nurpmeso wrote: > Sorry but i really have to come again, i do not understand what is > going on, and *i* think shell is at fault. No. It is working correctly. > > This: > > a() { > echo $#,1=$1,2=$2,"$*",$*, This $1 is unquoted, it will b

Question on differences on quoted $* (Was: Re: Question on $@ vs $@$@)

2024-08-23 Thread Steffen Nurpmeso
Sorry but i really have to come again, i do not understand what is going on, and *i* think shell is at fault. This: a() { echo $#,1=$1,2=$2,"$*",$*, } echo "$*"$* $*; a "$*"$* $* echo __ IFS=:;echo "$*"$* $*; a "$*"$* $*;unset IFS echo == set -- a b c echo "$*"$* $*; a "$*"$*

Re: Question on $@ vs $@$@

2024-08-23 Thread Steffen Nurpmeso
Greg Wooledge wrote in : |On Fri, Aug 23, 2024 at 01:28:49 +0200, Steffen Nurpmeso wrote: |> a() { echo $#,1=$1,2=$2,"$*",$*,; } |> set -- a b c |> echo 2 |> IFS=:; echo "$*"$*; a $* "$*"; I want to point out that bash in particular has the very dubious description in its manual page

Re: Question on $@ vs $@$@

2024-08-22 Thread Greg Wooledge
On Fri, Aug 23, 2024 at 01:28:49 +0200, Steffen Nurpmeso wrote: > a() { echo $#,1=$1,2=$2,"$*",$*,; } > set -- a b c > echo 2 > IFS=:; echo "$*"$*; a $* "$*"; Your printing function "a" is highly questionable. It's got unquoted word expansions that'll do who knows what, and it's also usin

Re: Question on $@ vs $@$@

2024-08-22 Thread Steffen Nurpmeso
Hello. Sorry for being here again, rather bash unrelated mostly.. Steffen Nurpmeso wrote in <20240816215210.PMy3rwiy@steffen%sdaoden.eu>: |Steffen Nurpmeso wrote in | <20240816212216.accse4FG@steffen%sdaoden.eu>: ||Robert Elz wrote in || <16443.1723841...@jacaranda.noi.kre.to>: |||Date:

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: 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

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-15 Thread Steffen Nurpmeso
One more, please. (And please excuse this still copies bug-bash.) Steffen Nurpmeso wrote in <20240815184858.r5T_UQnM@steffen%sdaoden.eu>: |Steffen Nurpmeso wrote in | <20240814200534.Vh3Eu_Md@steffen%sdaoden.eu>: ||Chet Ramey wrote in || <1bba673e-5ab9-4263-9d88-124854793...@case.edu>: |||On

Re: Question on $@ vs $@$@

2024-08-15 Thread Steffen Nurpmeso
Hello. Unfortunately i have to add one thing to this thread.. Steffen Nurpmeso wrote in <20240814200534.Vh3Eu_Md@steffen%sdaoden.eu>: |Chet Ramey wrote in | <1bba673e-5ab9-4263-9d88-124854793...@case.edu>: ||On 8/13/24 8:45 PM, Steffen Nurpmeso wrote: ||> I include bug-bash even though i thi

Re: Question on $@ vs $@$@

2024-08-15 Thread Marc Chantreux
On Wed, Aug 14, 2024 at 09:23:49AM -0400, Greg Wooledge wrote: > The most obvious would be to treat "$@$@" as if it were "$@" "$@", > generating exactly two words for each positional parameter. > > Thanks for this. My two cents: if I want "$@" "$@", i write it litterally. "$@$@" kinda

Re: Question on $@ vs $@$@

2024-08-14 Thread Steffen Nurpmeso
Hello. I only respond to this to reduce the noise. Chet Ramey wrote in <1bba673e-5ab9-4263-9d88-124854793...@case.edu>: |On 8/13/24 8:45 PM, Steffen Nurpmeso wrote: |> I include bug-bash even though i think bash is correct, but there |> lots of people of expertise are listening, so, thus. |>

Re: Question on $@ vs $@$@

2024-08-14 Thread Chet Ramey
On 8/13/24 8:45 PM, Steffen Nurpmeso wrote: Hello. I include bug-bash even though i think bash is correct, but there lots of people of expertise are listening, so, thus. Sorry for cross-posting, nonetheless. Given this snippet (twox() without argument it is) one() { echo "$# 1<$1>"; } two

Re: Question on $@ vs $@$@

2024-08-14 Thread Greg Wooledge
On Wed, Aug 14, 2024 at 17:58:15 +0300, Oğuz wrote: > On Wed, Aug 14, 2024 at 5:23 PM Robert Elz wrote: > > However, as ksh93 makes "" from this > > expansion, and so probably ksh88 might have done as well > > No, both Sun and SCO variants expand "$@$@" to zero fields when $# is 0. HP-UX 10.20 a

Re: Question on $@ vs $@$@

2024-08-14 Thread Oğuz
On Wed, Aug 14, 2024 at 5:23 PM Robert Elz wrote: > However, as ksh93 makes "" from this > expansion, and so probably ksh88 might have done as well No, both Sun and SCO variants expand "$@$@" to zero fields when $# is 0.

Re: Question on $@ vs $@$@

2024-08-14 Thread Robert Elz
Date:Wed, 14 Aug 2024 09:23:49 -0400 From:Greg Wooledge Message-ID: | The most obvious would be to treat "$@$@" as if it were "$@" "$@", That would clearly be wrong when there are positional parameters. | As a human trying to read this expression and figure out

Re: Question on $@ vs $@$@

2024-08-14 Thread Robert Elz
Date:Wed, 14 Aug 2024 11:04:08 +0200 From:Marc Chantreux Message-ID: | I'm really currious: do you see another one ? The case he was asking about is when $# is 0 (no positional params set) and whether "$@$@" should result in "" (1 arg) or nothing (0 args). Upon r

Re: Question on $@ vs $@$@

2024-08-14 Thread Greg Wooledge
On Wed, Aug 14, 2024 at 11:04:08 +0200, Marc Chantreux wrote: > > We know what "$@" is supposed to do. And something like "x${@}y" is > > well-defined also -- you simply prefix "x" to the first word, and append > > "y" to the final word. > > > But I don't know how "$@$@" is supposed to be interpr

Re: Question on $@ vs $@$@

2024-08-14 Thread Marc Chantreux
> We know what "$@" is supposed to do. And something like "x${@}y" is > well-defined also -- you simply prefix "x" to the first word, and append > "y" to the final word. > But I don't know how "$@$@" is supposed to be interpreted. I do not see > anything in the official wording that explains how

Re: Question on $@ vs $@$@

2024-08-14 Thread Oğuz
On Wednesday, August 14, 2024, Steffen Nurpmeso wrote: > > one() { echo "$# 1<$1>"; } > two() { one "$@"; } > twox() { one "$@$@"; } > two > two x > twox > twox x > $ dash shbug.sh > 0 1<> > 1 1 > 1 1<> > 1 1 > #?0|kent:tmp$ bash shbug.sh > 0 1<> > 1 1 > 0 1<>

Re: Question on $@ vs $@$@

2024-08-13 Thread Greg Wooledge
On Wed, Aug 14, 2024 at 02:45:25 +0200, Steffen Nurpmeso wrote: > I include bug-bash even though i think bash is correct, but there > lots of people of expertise are listening, so, thus. > Sorry for cross-posting, nonetheless. > Given this snippet (twox() without argument it is) > > one() { echo

Re: Question on $@ vs $@$@

2024-08-13 Thread alex xmb sw ratchev
On Wed, Aug 14, 2024, 02:45 Steffen Nurpmeso wrote: > Hello. > > I include bug-bash even though i think bash is correct, but there > lots of people of expertise are listening, so, thus. > Sorry for cross-posting, nonetheless. > Given this snippet (twox() without argument it is) > > one() { echo

Question on $@ vs $@$@

2024-08-13 Thread Steffen Nurpmeso
Hello. I include bug-bash even though i think bash is correct, but there lots of people of expertise are listening, so, thus. Sorry for cross-posting, nonetheless. Given this snippet (twox() without argument it is) one() { echo "$# 1<$1>"; } two() { one "$@"; } twox() { one "$@$@"; } two