FENIX_coreutils/dirname.1

46 lines
701 B
Groff
Executable File

.TH DIRNAME 1
.SH NAME
dirname \- return directory portion of a pathname
.SH SYNOPSIS
.B dirname
.IR string
.SH DESCRIPTION
.B dirname
strips a pathname of everything following the last slash and prints
the result. If the pathname has a trailing slash, it is removed and
it strips everything past the slash before it.
.SH OPTIONS
None
.SH EXAMPLES
.PP
.nf
.RS
dirname /usr/share/include/stdio.h
.RE
.fi
.PP
Prints out "/usr/share/include"
.PP
.nf
.RS
dirname stdio.h
.RE
.fi
.PP
Prints out "."
.PP
.nf
.RS
dirname //
.RE
.fi
.PP
Prints out "/"
.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.