Re: Automated Backup Script Help (Linux)
| От | John R Pierce |
|---|---|
| Тема | Re: Automated Backup Script Help (Linux) |
| Дата | |
| Msg-id | 4F57BF18.6000701@hogranch.com обсуждение исходный текст |
| Ответ на | Re: Automated Backup Script Help (Linux) (Carlos Mennens <carlos.mennens@gmail.com>) |
| Список | pgsql-general |
On 03/07/12 11:20 AM, Carlos Mennens wrote:
> SCRIPTPATH=$(cd ${0%/*}&& pwd -P)
thats line 7 by my count.
thats some very strange stuff there. AFAIK ${0%/*} means, take $0
which is the name of the invoking command ('sh' in the invocation you
gave), match and remove the results of the pattern /*
I think you're NOT supposed to invoke this script with `sh scriptname`
but instead invoke it as 'path/to/scriptname' (thereforce, it has to be
chmod +x). if it was invoked as ./script, then it would cd ., and set
SCRIPTPATH to the full path of .
again, this is a linux shell issue, has nothing to do with postgres,
regardless of the rest of the script.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
В списке pgsql-general по дате отправления: