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

Why does case-pattern undergo "process substitution"?

2024-08-23 Thread shynur .
Hi, friends~ I'm reading the Bash Reference Manual, section 3.2.5.2. Here: . case _word_ in [ [(] _pattern_ [| _pattern_]…) _command-list_ ;;]… esac Each _pattern_ undergoes tilde expansion, parameter ex