get the file name from path in shell script code example Example: basename bash basename(1) - strip directory and suffix from filenames