• Re: Bash: Passing Variables To coproc Subprocess

    From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.unix.shell on Fri Aug 22 14:32:02 2025
    From Newsgroup: comp.unix.shell

    In article <slrn10agumd.2p61.naddy@lorvorc.mips.inka.de>,
    Christian Weisgerber <naddy@mips.inka.de> wrote:
    On 2025-08-22, Kenny McCormack <gazelle@shell.xmission.com> wrote:

    Try:

    mapfile -t < <(find "$BASEDIR" -type d -name "$CHECKPOINTSDIR")

    Note: This will fail if you have directory names with newlines in them,

    mapfile -d '' -t < <(find ... -print0)

    As I said, if you have directory names with newlines in them, then you have more serious problems than I can help you with.
    --
    https://en.wiktionary.org/wiki/res_ipsa_loquitur
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to comp.unix.shell on Tue Aug 26 14:03:35 2025
    From Newsgroup: comp.unix.shell

    In article <10893ja$1dihv$1@dont-email.me>,
    Lawrence DOliveiro <ldo@nz.invalid> wrote:
    I was trying to write a Bash script to clean up the old checkpoints in
    my Jupyter notebooks directories, which have been accumulating for
    some years. The first version looked like this:

    I wonder if OP is still reading this thread. I'm curious how it all worked out. In particular, I'd like to know if there *is* any problem passing (un-exported) variables into coprocs.
    --
    Meatball Ron wants to replace the phrase "climate change" with the phrase "energy dominance" in policy discussions.

    Yeah, like that makes a lot of sense...
    --- Synchronet 3.21a-Linux NewsLink 1.2