You can access the current working directory with $cwd . Therefore, if you want to call printsth with the path to the current working directory, run the line with $cwd .
For example, if you want to call printsth in the current directory, say:
$cwd/printsth
If you want to call printsth one directory above:
$cwd/../printsth
Make sure this is a csh script (i.e. first line #!/bin/csh ). If it's a sh or bash script, you need to use $PWD (for a "real working directory"), not $cwd .
EDIT:
If you need a directory related to the script directory and not the current working directory, you can do this:
setenv SCRIPTDIR `dirname $0` $SCRIPTDIR/printsth
This will install $SCRIPTDIR in the same directory as the source script. Then you can create paths regarding this.
source share