basename directoryreturns the portion of directory after the last ``/", i.e. the current directory name.
For example,
#!/bin/sh CUR_DIR=`basename \$cwd`will set CUR_DIR to be the current directory name from the last ``/" to the end (if the current directory is /usr/people/cantin, it would return cantin).