diff options
author | rsc <devnull@localhost> | 2004-04-10 18:53:55 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-04-10 18:53:55 +0000 |
commit | cfa37a7b1131abbab2e7d339b451f5f0e3198cc8 (patch) | |
tree | a7fe52416e9d27efe2af2d54910112674c0fd7c6 /man/man1/basename.1 | |
parent | 08df2a433e69c94f9db002c83380cb2b693fee60 (diff) | |
download | plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.gz plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.tar.bz2 plan9port-cfa37a7b1131abbab2e7d339b451f5f0e3198cc8.zip |
Lots of man pages.
Diffstat (limited to 'man/man1/basename.1')
-rw-r--r-- | man/man1/basename.1 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/man/man1/basename.1 b/man/man1/basename.1 new file mode 100644 index 00000000..c72638f1 --- /dev/null +++ b/man/man1/basename.1 @@ -0,0 +1,35 @@ +.TH BASENAME 1 +.SH NAME +basename \- strip file name affixes +.SH SYNOPSIS +.B basename +[ +.B -d +] +.I string +[ +.I suffix +] +.SH DESCRIPTION +.PP +.I Basename +deletes any prefix ending in slash +.RB ( / ) +and the +.IR suffix , +if present in +.IR string , +from +.IR string , +and prints the result on the standard output. +.PP +The +.B -d +option instead prints the directory component, +that is, +.I string +up to but not including the final slash. +If the string contains no slash, +a period and newline are printed. +.SH SOURCE +.B /sys/src/cmd/basename.c |