Reference
strip non-directory suffix from file name
Linux Command
dirname NAME
Print NAME with its trailing /component removed; if NAME contains no/’s, output ‘.’ (meaning the current directory).--help display this help and exit--versionoutput version information and exit