Robert Elz wrote, on 14 May 2017:
>
> For NetBSD, I've just created a shell test of expansions where there
> is a '#' involved..
>
> The test includes the following comments...
>
> #
> # $# looks like it should be so simple that it doesn't really
> # need a test of
Date:Mon, 15 May 2017 10:03:04 +0100
From:Geoff Clare
Message-ID: <20170515090304.GA12956@lt2.masqnet>
Thanks for the reply.
| Explicitly unspecified in XCU 2.6.2.
Oh, sorry, I should have been clearer, I know that. I will however
add extra
Robert Elz wrote, on 15 May 2017:
>
> | ${#-} and ${#?} are the lengths of $- and $? (not treated as ${var-word}
> | or ${var?word} with an empty word).
>
> Thanks, I should add tests for those as well, (and ${#$} etc too, though they
> have no other possible meaning).
I'm wondering, is it desirable to have a precedence of checking list, since
'#' can be either parameter name or operator in that context, or require
if there is ambiguity that the # special parameter be represented as $#
inside the braces? I'm thinking 'foo=$# ${#foo##pat}' and '${pat}'
Hello.
I am wondering whether this is possible in (POSIX) sh(1)ells, as
an alternative to arrays, so to say, as i just cannot find a way
to achieve it, i always loose the quotes and finally end up where
i do not want to end. Something like this (in the MUA i maintain,
which does not support
It is not built in as a standard feature, ($@ has limitations) but it is
plausible to write shell functions that convert the list to CSV format values,
and back, as a "shell only" solution.
On Monday, May 15, 2017 Steffen Nurpmeso wrote:
Hello.
I am wondering whether this
Date:Mon, 15 May 2017 18:36:58 +0200
From:Steffen Nurpmeso
Message-ID: <20170515163658.b7ljs%stef...@sdaoden.eu>
| Is it at all possible to store the parameter stack in a variable
| "x" in order to restore it exactly "as-is", in the shell?
Date:Tue, 16 May 2017 10:03:56 +0700
From:Robert Elz
Message-ID: <14296.1494903...@andromeda.noi.kre.to>
| Just remember to always quote variable references "$x"
And then I see I forgot in ...
$ stack="$(quote $x):$*"
which is one of the
Date:Mon, 15 May 2017 17:39:41 -0400
From:shwares...@aol.com
Message-ID: <9ac89.7ef84acb.464b7...@aol.com>
| I'm thinking 'foo=$# ${#foo##pat}'
There is only ever one modification operator allowed in a (standard)
variable expansion, that can be the prefix '#'
Date:Tue, 16 May 2017 10:03:56 +0700
From:Robert Elz
Message-ID: <14296.1494903...@andromeda.noi.kre.to>
I keep replying to my own mail. This is really not a good sign!
| Alternatively, you could implement this as an external #! script, that
10 matches
Mail list logo