I have such a bash command ...
psql -c "SELECT datname FROM pg_database WHERE datname LIKE 'efa%' OR datname LIKE 'geocms%';"
and am wondering how to wrap this into watch -cd "<command>" properly. The excess of quotes is to be avoided.
tried those 2 without success
watch -cd `psql -c "SELECT datname FROM pg_database WHERE datname LIKE 'efa%';"`
watch -cd "psql -c \"SELECT datname FROM pg_database WHERE datname LIKE 'efa%';\""
EDIT:
escaping excess " with \"works actually:
watch -cd "psql -c \"SELECT datname FROM pg_database WHERE datname LIKE 'efa%';\""