crontab bash tests
Oliver Grawert
ogra at ubuntu.com
Mon Sep 25 15:27:02 UTC 2023
hi,
Am Montag, dem 25.09.2023 um 13:39 +0200 schrieb lejeczek via ubuntu-
users:
> [ $(psql --quiet --port=5433 -x -c 'select state
> from pg_stat_replication;' | grep streaming > /dev/null)$?
> -eq 0 ]
how about following karl and simplifying the whole thing to:
psql --quiet --port=5433 -x -c 'select state
from pg_stat_replication;' | grep -q "streaming" && foo || bar
save the brackets ! :)
ciao
oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20230925/98602647/attachment.sig>
More information about the ubuntu-users
mailing list