• [OT] Re: getFirstDayOfMonth()

    From Janis Papanagnou@21:1/5 to Mike Sanders on Tue Mar 5 03:18:03 2024
    On 05.03.2024 01:12, Mike Sanders wrote:
    Mike Sanders <[email protected]> wrote:

    [ dates -op1 -op2 file || echo no banana ]

    ITYM:

    dates -op1 -op2 file || echo no banana


    Make that instead:

    [ cmd ] || failure

    This makes little sense. Either write

    cmd || failure

    (with cmd and failure being commands), or write

    [ test-cond ] || failure

    with the '[' being another form of the 'test' command

    test test-cond || failure

    and test-cond being any valid test condition.

    There's also other applications possible, like, say,

    [ -n "$(cmd)" ] || failure

    that somewhat resembles your cmd expression above.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Sanders@21:1/5 to Janis Papanagnou on Tue Mar 5 02:55:53 2024
    Janis Papanagnou <[email protected]> wrote:

    [ cmd ] || failure

    This makes little sense. Either write

    cmd || failure

    (with cmd and failure being commands), or write

    [ test-cond ] || failure

    with the '[' being another form of the 'test' command

    test test-cond || failure

    and test-cond being any valid test condition.

    There's also other applications possible, like, say,

    [ -n "$(cmd)" ] || failure

    that somewhat resembles your cmd expression above.

    Janis

    Another post for my notes (about dozen or more of yours now).

    Thanks.

    --
    :wq
    Mike Sanders

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)