• Re: PSA: How to add WSL grep to the Windows command-line PATH

    From Lawrence D?Oliveiro@3:633/10 to All on Friday, August 28, 2026 01:21:22
    On Thu, 27 Aug 2026 14:44:23 -0400, Paul wrote:

    Winget may span more than one repository. As if I do this:

    winget list

    I don't see any Coreutils by doing that.

    I understand what Microsoft have actually done is port the Rust-based
    remake of Coreutils, rather than the original versions written in C.

    I further understand that there are some inadvertent incompatibilities
    in the Rust-based Coreutils, which has caused Ubuntu to revert
    embracing them and go back to the original versions.

    <https://linuxiac.com/ubuntu-reverts-rust-cp-after-it-breaks-live-image-builds/>

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Thursday, August 27, 2026 22:21:14
    On Thu, 8/27/2026 9:21 PM, Lawrence D?Oliveiro wrote:
    On Thu, 27 Aug 2026 14:44:23 -0400, Paul wrote:

    Winget may span more than one repository. As if I do this:

    winget list

    I don't see any Coreutils by doing that.

    I understand what Microsoft have actually done is port the Rust-based
    remake of Coreutils, rather than the original versions written in C.

    I further understand that there are some inadvertent incompatibilities
    in the Rust-based Coreutils, which has caused Ubuntu to revert
    embracing them and go back to the original versions.

    <https://linuxiac.com/ubuntu-reverts-rust-cp-after-it-breaks-live-image-builds/>


    A topic like this, is a bit like explaining wine selection,
    to people who don't drink wine. You have to do your research
    and select a good vintage.

    At least with cygwin, you used to see some amount of curation,
    some amount of organization. The x86 version, I liked that and
    had installed it several times over the years. But when that
    was discontinued and an x64 version showed up, I installed
    that one day, and there was some disconcerting network activity,
    (something you never saw on the x86 version), I uninstalled it
    and that was the last Cygwin here. But other than that, at least
    you have a lineup of stuff that's all been tested and packages
    managed.

    The winget thing, I have no idea if it has any concept of
    "Repository" or it just "shops at the 7-11 and the Dollar Store".
    It seems to be downloading from Sourceforge. Working with Sourceforge
    is fine, as long as you do some amount of investigation before
    the install step. A thing like WinGet as a concept, to be shooting
    from the hip like that, the Repository used must be well maintained
    to be that trusting. And finding it downloading from Sourceforge
    does not inspire confidence. I have no idea what the folks at
    Sourceforge do, to ensure no supply side attacks. I could understand this behavior, if say, Microsoft had bought Sourceforge.

    Paul

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Friday, August 28, 2026 04:25:56
    On Thu, 27 Aug 2026 22:21:14 -0400, Paul wrote:

    On Thu, 8/27/2026 9:21 PM, Lawrence D?Oliveiro wrote:

    I understand what Microsoft have actually done is port the
    Rust-based remake of Coreutils, rather than the original versions
    written in C.

    I further understand that there are some inadvertent
    incompatibilities in the Rust-based Coreutils, which has caused
    Ubuntu to revert embracing them and go back to the original
    versions.

    <https://linuxiac.com/ubuntu-reverts-rust-cp-after-it-breaks-live-image-builds/>

    A topic like this, is a bit like explaining wine selection, to
    people who don't drink wine. You have to do your research and select
    a good vintage.

    The cp(1) command is documented to work a certain way. The C version
    does that, the Rust version doesn?t.

    <https://manpages.debian.org/cp(1)>

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Sunday, August 30, 2026 06:56:55
    On Sat, 29 Aug 2026 23:05:42 -0600, Maria Sophia wrote:

    This is apparently due to quirks in how Windows cmd.exe handles
    syntax compared to how Linux bash handles that same syntax.

    Remember what I said earlier about fundamental limitations in the way
    Windows handles the command line?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Sunday, August 30, 2026 05:26:13
    On Sun, 8/30/2026 2:56 AM, Lawrence D?Oliveiro wrote:
    On Sat, 29 Aug 2026 23:05:42 -0600, Maria Sophia wrote:

    This is apparently due to quirks in how Windows cmd.exe handles
    syntax compared to how Linux bash handles that same syntax.

    Remember what I said earlier about fundamental limitations in the way
    Windows handles the command line?


    I bet you can find better ways to do it.

    In gawk, you can put a couple lines in a BEGIN {} clause
    to handle line endings in and out. When you take
    a script from Windows to Linux, you can add that to your
    script to compensate for line endings.

    BEGIN {
    RS="\r\n";
    ORS="\n";
    }

    These inline scripts, don't have to be inline.
    You can shield them in their own files. Then the
    Perl or AWK follow their own rules on quoting or whatever.
    Sometimes, it's even easier to read the code and
    make sense of it, if the code is indented and so on.

    I don't normally do AWK one-liners. I like to put them
    in files, for searching them later. I can look for file
    extension .awk and Agent Ransack content search on RS,
    to find examples of how to use RS.

    Just about every OS, has pitiful examples of escape sequences,
    and how you can "spend half a morning" figuring it out. It's
    better to just reduce the mental load by putting things in boxes.

    Paul

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Sunday, August 30, 2026 23:31:08
    On Sun, 30 Aug 2026 05:26:13 -0400, Paul wrote:

    On Sun, 8/30/2026 2:56 AM, Lawrence D?Oliveiro wrote:

    On Sat, 29 Aug 2026 23:05:42 -0600, Maria Sophia wrote:

    This is apparently due to quirks in how Windows cmd.exe handles
    syntax compared to how Linux bash handles that same syntax.

    Remember what I said earlier about fundamental limitations in the
    way Windows handles the command line?

    I bet you can find better ways to do it.

    On Windows, you can only do this by avoiding putting things on the
    command line altogether:

    These inline scripts, don't have to be inline. You can shield them
    in their own files. Then the Perl or AWK follow their own rules on
    quoting or whatever.

    However:

    Just about every OS, has pitiful examples of escape sequences, and
    how you can "spend half a morning" figuring it out.

    Some are more pitiful than others.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)