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)