shell scripting

Поиск
Список
Период
Сортировка
От Marc Tardif
Тема shell scripting
Дата
Msg-id Pine.LNX.4.10.10004041800410.5070-100000@Gloria.CAM.ORG
обсуждение исходный текст
Ответы Re: shell scripting  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Список pgsql-general
Is ther any way to foresee if a database exists or if a user has
permission to read/write a database from within a shell script?
The best I've come up with so far is to check for the exit status after
running a random command. For example:

/usr/local/pgsql/bin/pg_dump -s db > schema
if [ $? != 0 ]; then
  echo "something went wrong somewhere";
fi

Unfortunately, this is not very accurate as it still doesn't say if I have
read and/or write permissions to the database.

Please let me know if you have anything,
Marc


В списке pgsql-general по дате отправления:

Предыдущее
От: Herbert Liechti
Дата:
Сообщение: Re: Re: Apache::Session
Следующее
От: "John Henderson"
Дата:
Сообщение: Re: Fetching record of the day