The basename command extracts the everything after the last / character in a string. In this example, just the text "Documents" will be returned.
basename can also be used in a shell script to print the name of the script. For example, if the script is foo.sh, the following command in the script will print foo.sh.
echo $(basename $0)