hpux man page for dirname

Query: dirname

OS: hpux

Section: 1

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

basename(1)						      General Commands Manual						       basename(1)

NAME
basename, dirname - extract portions of path names
SYNOPSIS
string [suffix] [string]
DESCRIPTION
deletes any prefix ending in and the suffix (if present in string) from string, and prints the result on the standard output. If string consists entirely of slash characters, string is set to a single slash character. If there are any trailing slash characters in string, they are removed. If the suffix operand is present but not identical to the characters remaining in string, but it is identical to a suf- fix of the characters remaining in string, the suffix is removed from string. is normally used inside command substitution marks within shell procedures. delivers all but the last level of the path name in string. If string does not contain a directory component, returns indicating the cur- rent working directory.
EXTERNAL INFLUENCES
Environment Variables determines the interpretation of string and, in the case of basename, suffix as single and/or multi-byte characters. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, and behave as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multi-byte character code sets are supported.
EXAMPLES
The following shell script, invoked with the argument compiles the named file and moves the output to a file named in the current direc- tory: The following example sets the shell variable to
RETURN VALUE
and return one of the following values: Successful completion. Incorrect number of command-line arguments.
SEE ALSO
expr(1), sh(1).
STANDARDS CONFORMANCE
basename(1)
Related Man Pages
dirname(1) - opensolaris
split(1) - hpux
dirname(1) - osf1
basename(1) - sunos
basename(1p) - posix
Similar Topics in the Unix Linux Community
Extract string between two different characters
Extracting data from a string containing &;
How can we get the character before and after a word in a string?
Outputting characters after a given string and reporting the characters in the row below --sed
Generate a string of alphanumeric characters