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

    From Lawrence D?Oliveiro@3:633/10 to All on Fri Aug 28 01:21:22 2026
    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 Thu Aug 27 22:21:14 2026
    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 Fri Aug 28 04:25:56 2026
    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 Fri Aug 28 05:00:55 2026
    On Thu, 27 Aug 2026 21:11:58 -0600, Maria Sophia wrote:

    I, for one, always thought Linux, being free and rather capable,
    would outcompete Windows, but alas, there's power to corporate
    MSOffice that is undeniably sticky, to the point that Linux is
    mostly servers, not desktops.

    Microsoft seems to be moving away from ?Microsoft Office? towards
    ?Microsoft 365?. And the latter lists Linux as an officially-supported platform.

    --- 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 Fri Aug 28 06:34:17 2026
    On Thu, 27 Aug 2026 23:12:20 -0600, Maria Sophia wrote:

    Most of the adb examples on the web assume Unix tools such as grep,
    sed or awk are available in the shell. That grep/sed/awk combination
    is completely natural on the Linux side but less natural from a
    Windows command prompt.

    The noble quest is to make that completely natural on the Windows
    CLI. With Paul's CoreUtils solution & my WSL solution, we're almost
    there now.

    There are fundamental limitations on Windows which prevent that from
    ever being a mainstream solution.

    --- 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 Fri Aug 28 22:26:49 2026
    On Fri, 28 Aug 2026 15:27:32 -0600, Maria Sophia wrote:

    For decades, I wondered why Linux didn't kill Windows, where, over
    the years, I had to conclude that the MS Office suite was sticky
    stuff in corporate environs, and, seemingly just as web like in home computing.

    Linux has taken over every market outside the desktop where Windows
    has tried to go: mobile (Windows Phone, Windows RT), living-room
    (Windows Media Center), home server (Windows Home Server), corporate
    (Windows Server), supercomputer (Windows Server HPC) -- all those
    Microsoft products were killed by Linux.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Hank Rogers@3:633/10 to All on Fri Aug 28 17:47:31 2026
    Lawrence D?Oliveiro wrote on 8/28/2026 5:26 PM:
    On Fri, 28 Aug 2026 15:27:32 -0600, Maria Sophia wrote:

    For decades, I wondered why Linux didn't kill Windows, where, over
    the years, I had to conclude that the MS Office suite was sticky
    stuff in corporate environs, and, seemingly just as web like in home
    computing.

    Linux has taken over every market outside the desktop where Windows
    has tried to go: mobile (Windows Phone, Windows RT), living-room
    (Windows Media Center), home server (Windows Home Server), corporate
    (Windows Server), supercomputer (Windows Server HPC) -- all those
    Microsoft products were killed by Linux.


    Indeed. I am amazed that there are still 7 people left who claim to run microsoft windows. I think they are all running linux and lying about it.

    Why do they do this?





    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Frank Slootweg@3:633/10 to All on Sat Aug 29 14:35:39 2026
    Hank Rogers <Hank@nospam.invalid> wrote:
    Lawrence D?Oliveiro wrote on 8/28/2026 5:26 PM:
    On Fri, 28 Aug 2026 15:27:32 -0600, Maria Sophia wrote:

    For decades, I wondered why Linux didn't kill Windows, where, over
    the years, I had to conclude that the MS Office suite was sticky
    stuff in corporate environs, and, seemingly just as web like in home
    computing.

    Linux has taken over every market outside the desktop where Windows
    has tried to go: mobile (Windows Phone, Windows RT), living-room
    (Windows Media Center), home server (Windows Home Server), corporate (Windows Server), supercomputer (Windows Server HPC) -- all those
    Microsoft products were killed by Linux.

    Indeed. I am amazed that there are still 7 people left who claim to run microsoft windows. I think they are all running linux and lying about it.

    Why do they do this?

    Exactly! As is clear from my 'User-Agent:' header, I'm one of those
    liars.

    I try to fob people off by using sed(1) (Can I be *more transparent!?)
    to insert lame attempts like "CYGWIN", "NT", "WOW", etc. but of course
    nobody is really falling for *that* one.

    BTW, I didn't know that apparantly Android is Linux, but macOS isn't Unix/UNIX. Never too old to learn.

    --- 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 Sun Aug 30 02:03:32 2026
    On Sat, 29 Aug 2026 16:40:32 -0600, Maria Sophia wrote:

    It's too bad the MS Rust CoreUtils don't have awk & sed though...

    perl >> awk

    sed ... I suppose it has its uses ...

    --- 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 Sun Aug 30 06:56:55 2026
    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 Sun Aug 30 05:26:13 2026
    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 Sun Aug 30 23:31:08 2026
    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)