Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Chet Ramey
On 5/16/17 6:33 AM, Robert Elz wrote: > If we start having shell parsing differently depending on what locale the > user happens to be using, we may as well all give up now, and go find > something else to do. Too late:

Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Stephane Chazelas
2017-05-16 17:33:26 +0700, Robert Elz: [...] > | Or just write it as quote() (...) instead of quote() { ...;} > > Yes, as you would have seen later, I mentioned that in a subsequent > message. Sorry about that. I hadn't seen that message at the time I replied. [...] > | Here, I'd fire awk

[OT] of the merit of using awk for performance or who's got the fastest quote() (Was: sh(1): is roundtripping of the positional parameter stack possible?)

2017-05-16 Thread Stephane Chazelas
2017-05-16 17:29:13 +0100, Stephane Chazelas: [...] > > | Here, I'd fire awk and quote more than one arg at a time: > > > > Hmm - you're really aiming for maximum sluggishness... I could beat that > > by just adding a couple of sleeps ... > > Depends. If quoting only a handful a arguments,

RE: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Schwarz, Konrad
> -Original Message- > From: Stephane Chazelas [mailto:stephane.chaze...@gmail.com] > To: Robert Elz > Cc: Steffen Nurpmeso; austin-group-l@opengroup.org > Subject: Re: sh(1): is roundtripping of the positional parameter stack > Here, I'd fire awk and quote more than one arg at a time: >

Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Stephane Chazelas
2017-05-16 10:03:56 +0700, Robert Elz: > Date:Mon, 15 May 2017 18:36:58 +0200 > From:Steffen Nurpmeso > Message-ID: <20170515163658.b7ljs%stef...@sdaoden.eu> [...] > Alternatively, you could implement this as an external #! script, that > would be

Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Robert Elz
Date:Tue, 16 May 2017 07:41:43 +0100 From:Stephane Chazelas Message-ID: <20170516064143.ga3...@chaz.gmail.com> | Or just write it as quote() (...) instead of quote() { ...;} Yes, as you would have seen later, I mentioned that in a

Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Steffen Nurpmeso
"Schwarz, Konrad" wrote: |> -Original Message- |> From: Stephane Chazelas [mailto:stephane.chaze...@gmail.com] |> To: Robert Elz |> Cc: Steffen Nurpmeso; austin-group-l@opengroup.org |> Subject: Re: sh(1): is roundtripping of the positional parameter stack

Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Stephane Chazelas
2017-05-16 10:03:56 +0700, Robert Elz: [...] > $ y=$(quote "$x") [...] > Just remember to always quote variable references "$x" unless you are > 100% certain what the content of the variable is, eg: as above with $y > where we know it is the result of the quote function, so is safe. [...] No,

Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Jilles Tjoelker
On Tue, May 16, 2017 at 07:41:43AM +0100, Stephane Chazelas wrote: > 2017-05-16 10:03:56 +0700, Robert Elz: > > Date:Mon, 15 May 2017 18:36:58 +0200 > > From:Steffen Nurpmeso > > Message-ID: <20170515163658.b7ljs%stef...@sdaoden.eu> > [...] > >