User Commands  - splitname (1)

NAME

splitname(1f) - [FUNIX] strip pathname into components {dir,name,basename,extension} (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
See Also
Author
License

SYNOPSIS

splitname [NAME1 NAME2 ... |[ -d -b -l -e]|-help|-version]

DESCRIPTION

Output each pathname broken into components directory, leaf name, basename, extension

Output is always in the form and order

      "dir" "name" "basename" "ext"

OPTIONS

NAMES pathnames to split
-d print director name
-l print leaf name
-b print base name sans any suffix
-e print suffix extension
--stdin
  flag to read pathnames from stdin instead of command line
--help display this help and exit
--version
  output version information and exit

EXAMPLES

Sample program executions:

     splitname /usr/bin/          -> "/usr/bin" "" "" ""
     splitname /usr/bin           -> "/usr" "bin" "" ""
     splitname stdio.h            -> "" "studio.h" "studio" ".h"

SEE ALSO

dirname(1), basename(1), readlink(1), realpath(1)

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 splitname (1) February 23, 2025
Generated by manServer 1.08 from 8b5257d2-8237-4693-9eb4-8050b699dbbb using man macros.