Search Postgresql Archives

Re: Automated Backup Script Help (Linux)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux