View Full Version : Unix shell scripters - file location in script

05 May 2007, 02:04 AM
I am using symbolic links to manage files that are referenced.

I have written a BASH script that I can simply drop on the cmd line and hit enter... it then updates all the symbolic links that the maya file then uses to find the relevant references.

Does anyone know how to use the file location in the script itself to be used as a path variable?

Currently I doing something like:
ln -f -s "${projPath}/${fileName}" "${projPath}/${fileNameSym}"

If I move the directory that contains this file I have to go in and update the relative path by hand, what I would rather do is:

... like I said, this is all in a file that I drop onto the cmd line to execute... shouldn't it be able to know where it is?

CGTalk Moderation
05 May 2007, 02:04 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.