
19 Nov
2007
19 Nov
'07
9:51 a.m.
On Nov 19, 2007 10:35 AM, Simon Marlow
pwd gives you the directory that the script was invoked *from*, not the directory in which the script resides. This is a common problem on Unix: there's no general way to find out the location of a binary.
Well, you can always combine the first argument of the script ($0) for absolute paths and combine it with with pwd for relative ones.