Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

7 May, 2024: fms is rebuilding. Don't expect much in that section for quite a few days, maybe longer.


devel / comp.unix.shell / Re: Going down the zsh rabbit-hole... (Was: Removing empty directories)

SubjectAuthor
* Removing empty directoriesJanis Papanagnou
+- Re: Removing empty directoriesmarrgol
+- Re: Removing empty directoriesBen Collver
+- Re: Removing empty directoriesKenny McCormack
+* Re: Removing empty directoriesKaz Kylheku
|+* Re: Removing empty directoriesChristian Weisgerber
||`* Re: Removing empty directoriesKaz Kylheku
|| `- Re: Removing empty directoriesChristian Weisgerber
|`- Re: Removing empty directoriesHelmut Waitzmann
+* Re: Removing empty directoriesBen Bacarisse
|+* Re: Removing empty directoriesJanis Papanagnou
||+* Re: Removing empty directoriesAragorn
|||`* Re: Removing empty directoriesJanis Papanagnou
||| `* Long options, like it or not, are the future (Was: Removing empty directories)Kenny McCormack
|||  +* Re: Long options, like it or not, are the future (Was: Removing emptyChris Elvidge
|||  |`- Re: Long options, like it or not, are the futureHelmut Waitzmann
|||  +* Re: Long options, like it or not, are the future (Was: RemovingKaz Kylheku
|||  |`* Re: Long options, like it or not, are the futureDan Espen
|||  | `* Re: Long options, like it or not, are the futureKaz Kylheku
|||  |  `* Re: Long options, like it or not, are the futureDan Espen
|||  |   `- Re: Long options, like it or not, are the futureKaz Kylheku
|||  `- Re: Long options, like it or not, are the future (Was: Removing emptyJanis Papanagnou
||`- Re: Removing empty directoriesBen Bacarisse
|`- Re: Removing empty directoriesKaz Kylheku
+* Re: Removing empty directoriesHelmut Waitzmann
|`* Re: Removing empty directoriesKaz Kylheku
| `* Re: Removing empty directoriesHelmut Waitzmann
|  `- Re: Removing empty directoriesKaz Kylheku
+* Re: Removing empty directoriesLew Pitcher
|`- Re: Removing empty directoriesKaz Kylheku
`* Re: Removing empty directoriesBrian Patrie
 `* Re: Removing empty directoriesJanis Papanagnou
  `* Re: Removing empty directoriesJanis Papanagnou
   `* Re: Removing empty directoriesEric Pozharski
    `* Re: Removing empty directoriesBrian Patrie
     +* Re: Removing empty directoriesKaz Kylheku
     |+- Re: Removing empty directoriesKaz Kylheku
     |`- Re: Removing empty directoriesJanis Papanagnou
     `* Re: Removing empty directoriesJanis Papanagnou
      +* Re: Removing empty directoriesEric Pozharski
      |`* Going down the zsh rabbit-hole... (Was: Removing empty directories)Kenny McCormack
      | +- Re: Going down the zsh rabbit-hole... (Was: Removing emptyEric Pozharski
      | `* Re: Going down the zsh rabbit-hole... (Was: Removing emptyJanis Papanagnou
      |  `* Re: Going down the zsh rabbit-hole... (Was: Removing emptyEric Pozharski
      |   `* Re: Going down the zsh rabbit-hole... (Was: Removing emptyJanis Papanagnou
      |    `* Re: Going down the zsh rabbit-hole... (Was: Removing emptyJanis Papanagnou
      |     `* Re: Going down the zsh rabbit-hole... (Was: Removing emptyEric Pozharski
      |      `* Re: Going down the zsh rabbit-hole... (Was: Removing emptyJanis Papanagnou
      |       `* Re: Going down the zsh rabbit-hole... (Was: Removing emptyEric Pozharski
      |        `- Re: Going down the zsh rabbit-hole... (Was: Removing emptyJanis Papanagnou
      `* Re: Removing empty directoriesBrian Patrie
       `- Re: Removing empty directoriesKaz Kylheku

Pages:123
Re: Going down the zsh rabbit-hole... (Was: Removing empty directories)

<slrntb8chp.1rc.whynot@orphan.zombinet>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5405&group=comp.unix.shell#5405

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: whynot@pozharski.name (Eric Pozharski)
Newsgroups: comp.unix.shell
Subject: Re: Going down the zsh rabbit-hole... (Was: Removing empty
directories)
Date: Thu, 23 Jun 2022 09:28:25 +0000
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <slrntb8chp.1rc.whynot@orphan.zombinet>
References: <t870s4$118f$1@gioia.aioe.org> <t8j5gf$hgs$1@gioia.aioe.org>
<t8je2e$unq$1@dont-email.me> <slrntarjm8.phb.whynot@orphan.zombinet>
<t8l3s0$1o173$1@news.xmission.com> <t8o5mn$bam$1@dont-email.me>
<slrntb0vhr.u28.whynot@orphan.zombinet> <t8ripr$qlm$1@dont-email.me>
<t8rk4k$1or$1@dont-email.me> <slrntb641a.p9t.whynot@orphan.zombinet>
<t90c2e$cqs$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="87282064e2b3ebac04c6c962f4e9aa04";
logging-data="28919"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oInIa7af0sEABQy7gLGqV"
User-Agent: slrn/pre1.0.0-18 (Linux)
Cancel-Lock: sha1:aXXWssZsip9tj0atJHiWTPOqbdE=
 by: Eric Pozharski - Thu, 23 Jun 2022 09:28 UTC

with <t90c2e$cqs$1@dont-email.me> Janis Papanagnou wrote:
> On 22.06.2022 14:50, Eric Pozharski wrote:
>> with <t8rk4k$1or$1@dont-email.me> Janis Papanagnou wrote:

*SKIP*
>>>> since "${slvr[@]}" is the standard to access array elements, and
>>>> filenames with spaces (etc.) would have issues (in ksh and bash).
>> True, (abstract) you can write bash in zsh. What's (personal) your
>> point?
> Oh, it's just that [in ksh, bash] the $slvr in rmdir $slvr expands
> to a string of elements separated also by e.g. whitespace. That's
> strictly speaking not relevant in a specific case where names like
> W[0-5][0-9] are expanded. But in general [in ksh, bash, and I'd
> suppose also in zsh] if populating an array slvr=( ... ) to keep the
> argument structure intact we'd better use "${slvr[@]}" to preserve the
> argument structure of the array elements and not get undesired word
> splitting. Another point is that [in ksh, bash] $slvr would not
> expand the whole array but only the first element.

Well, instead walls of text I would like to see references to
specifications (or something) that clearly sets order of expansions of
bash as _standard_. Otherwise, it's just a choice that has been made
decades ago and now it's kept because backward compatibility.

> $ a=( "A B" "C D" )
> $ printf "'%s'\n" $a
> 'A'
> 'B'
> $ printf "'%s'\n" "$a"
> 'A B'
> $ printf "'%s'\n" "${a[@]}"
> 'A B'
> 'C D'

You point to "structure". But true difference is:

$ foo=( aa bb cc )
$ echo $foo
aa

Now, what 'rmdir' will see exactly?

> That was my point. (And a question whether zsh behaves differently if
> compared to ksh, bash; as it seems to do as I've just tried.) So for
> folks who are not residing solely in zsh it might be better to use the
> more portable syntax that zsh also supports. For zsh-only users my
> point is probably irrelevant.

Good. Now you (and hopefully others) realize there is world without
bash. My job here is done. Farewell... (and I'm doing that thing)

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Re: Going down the zsh rabbit-hole... (Was: Removing empty directories)

<t91j2e$c8i$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5406&group=comp.unix.shell#5406

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Going down the zsh rabbit-hole... (Was: Removing empty
directories)
Date: Thu, 23 Jun 2022 13:33:34 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <t91j2e$c8i$1@dont-email.me>
References: <t870s4$118f$1@gioia.aioe.org> <t8j5gf$hgs$1@gioia.aioe.org>
<t8je2e$unq$1@dont-email.me> <slrntarjm8.phb.whynot@orphan.zombinet>
<t8l3s0$1o173$1@news.xmission.com> <t8o5mn$bam$1@dont-email.me>
<slrntb0vhr.u28.whynot@orphan.zombinet> <t8ripr$qlm$1@dont-email.me>
<t8rk4k$1or$1@dont-email.me> <slrntb641a.p9t.whynot@orphan.zombinet>
<t90c2e$cqs$1@dont-email.me> <slrntb8chp.1rc.whynot@orphan.zombinet>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 23 Jun 2022 11:33:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0b81faa89895a1165a4bebbdc83f6663";
logging-data="12562"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dBAVyIFdeX29l0xryuRwX"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:rycbU0JVKOHDw8wW2dRkFePqOcI=
In-Reply-To: <slrntb8chp.1rc.whynot@orphan.zombinet>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Thu, 23 Jun 2022 11:33 UTC

On 23.06.2022 11:28, Eric Pozharski wrote:
> *SKIP*
>>>>> "${slvr[@]}"
>
> Well, instead walls of text I would like to see references to
> specifications (or something) that clearly sets order of expansions of
> bash as _standard_.

It's no "standard" in the sense of POSIX (if you meant that).
Last time I looked there's still no arrays supported by POSIX
but the positional parameters.

> Otherwise, it's just a choice that has been made
> decades ago and now it's kept because backward compatibility.

It's a feature (with a specific syntax) that had indeed been
introduced decades ago. That syntax for arrays, initialization
a=( ... ) and referencing the data in a structured way "${a[@]}",
has been adopted by a couple shells, and zsh seems to support
that as well. So it became a quasi-standard if you want to use
arrays (beyond the positional parameters) in those shells that
support them.

But zsh has made a couple other features and expansion decisions
that are not only non-standard but also unique to zsh. (I'm fine
with that.)

>
> Good. Now you (and hopefully others) realize there is world without
> bash. My job here is done. Farewell... (and I'm doing that thing)

Not sure what job you've actually done, but have a nice farewell.

Janis

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor