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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to