I wouldn't use four external commands just the get a filename. However, once you have it, it's a simple matter of parameter expansion: Code: file_name=${file_name##*/}
file_name=${file_name##*/}