What about that:
project=$(pwd | sed -n 's|^.*/\([^/]*\)/[^/]*$|\1|p')
Of course, if the working-dir of the script is not .../script, but the script file actually is there, then you have to append
cd "$(dirname "$0")" &&
just in front of pwd.
Last edited by theYinYeti; 09-13-2004 at 03:58 AM.