Re: [execline] Conditional export

From: Daniel Griscom <griscom_at_suitable.com>
Date: Thu, 23 Mar 2023 11:40:31 -0400

Here come's Hyrum's Law <https://www.hyrumslaw.com/>...

Laurent Bercot wrote on 3/23/23 11:19 AM:
>
>  I'm going to regret this.
>
> ifthenelse -s { eltest -f ${FILE} } { export EXISTS ${FILE} } { }
> env
>
>  This construct is purposefully not documented, because it breaks
> syntactic and logic assumptions that are true in the rest of execline.
> But it can simplify your life in a handful of cases, like this one.
>
>  What it does: it will *prepend the rest of your script* with the
> contents of the second or the third block, depending on whether the
> test in the first block is true.
>
>  Do not overuse it. Do not ask for support about it. If it makes your
> script easier to maintain, enjoy. If you start feeling like a sorcerer
> and are tempted to explore what kind of magical feats you can accomplish
> with it, don't - it will not end well.
>
> --
>  Laurent
>

-- 
Daniel T. Griscom
152 Cochrane Street, Melrose, MA 02176-1433
(781) 662-9447  griscom_at_suitable.com  http://www.suitable.com/
Received on Thu Mar 23 2023 - 16:40:31 CET

This archive was generated by hypermail 2.4.0 : Thu Mar 23 2023 - 16:41:03 CET