.TH BASENAME 1 .SH NAME basename \- return non-directory portion of a pathname .SH SYNOPSIS .B basename .IR string [\fIsuffix\fR] .SH DESCRIPTION .B basename strips a pathname of everything but the string following the last slash and prints the result. If the pathname has a trailing slash, it is removed, and it prints everything past the slash before it. If a suffix is included, it will remove the suffix from the basename before printing it. .SH OPTIONS None .SH EXAMPLES .PP .nf .RS basename /usr/share/include/stdio.h .RE .fi .PP Prints out "stdio.h" .PP .nf .RS basename /usr/share/include/stdio.h .h .RE .fi .PP Prints out "stdio" .SH AUTHOR Written by Kat. .SH COPYRIGHT Copyright (C) 2019 Katlynn Richey .PP This software is free software. Feel free to modify it and/or pass it around.