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

finding directory of referensed file (through link)



I am running a script through a link (ln -s) and I want to find the directory 
of the actual file and not the link.
In the script I want to cd into its directory. Using
cd $(dirname $0)
changes dir into the link's directory instead of the actual scripts directory. 
Is there a simple way to do this?

-- 
Micha Feigin
michf@post.tau.ac.il



Reply to: