මෙම පිළිගත් පිළිතුර දී හොඳින් ක්රියා සාමාන්ය නඩු , නමුත් අසාර්ථක අද්දර නඩු එනම්,:
- දිගුවකින් තොරව ගොනු නාම සඳහා ( මෙම පිළිතුරේ ඉතිරි කොටසෙහි උපසර්ගය ලෙස හැඳින්වේ ), extension=${filename##*.}හිස් නූලකට වඩා ආදාන ගොනු නාමය ලබා දෙයි.
- extension=${filename##*.}- .සම්මුතියට පටහැනිව ආරම්භක , ඇතුළත් නොවේ .- 
- අන්ධ ලෙස පෙර සූදානම .උපසර්ගය නොමැතිව ගොනු නාම සඳහා ක්රියා නොකරනු ඇත.
 
- filename="${filename%.*}"සම්මුතියට පටහැනිව , ආදාන ගොනුවේ නම ආරම්භ වී- .තවත්- .අක්ෂර (උදා,- .bash_profile) අඩංගු නොවේ නම් හිස් නූල වනු ඇත .
---------
මේ අනුව, සියලු දාර ආවරණය වන ශක්තිමත් විසඳුමක සංකීර්ණත්වය ශ්රිතයක් ඉල්ලා සිටී - එහි අර්ථ දැක්වීම පහත බලන්න; එයට මාර්ගයක සියලුම අංග ආපසු ලබා දිය හැකිය .
උදාහරණ ඇමතුම:
splitPath '/etc/bash.bashrc' dir fname fnameroot suffix
# -> $dir == '/etc'
# -> $fname == 'bash.bashrc'
# -> $fnameroot == 'bash'
# -> $suffix == '.bashrc'
ආදාන මාර්ගයෙන් පසුව ඇති තර්ක නිදහසේ තෝරාගෙන ඇති බව සලකන්න, ස්ථානීය විචල්ය නම් . 
ඒවාට පෙර ඇති උනන්දුවක් නොදක්වන විචල්යයන් මඟ _හැරීම සඳහා , සඳහන් කරන්න (විසි කිරීමේ විචල්යය භාවිතා කිරීමට $_) හෝ ''; උදා: ගොනු නාම මූල සහ දිගුව පමණක් උපුටා ගැනීමට, භාවිතා කරන්න splitPath '/etc/bash.bashrc' _ _ fnameroot extension.
# SYNOPSIS
#   splitPath path varDirname [varBasename [varBasenameRoot [varSuffix]]] 
# DESCRIPTION
#   Splits the specified input path into its components and returns them by assigning
#   them to variables with the specified *names*.
#   Specify '' or throw-away variable _ to skip earlier variables, if necessary.
#   The filename suffix, if any, always starts with '.' - only the *last*
#   '.'-prefixed token is reported as the suffix.
#   As with `dirname`, varDirname will report '.' (current dir) for input paths
#   that are mere filenames, and '/' for the root dir.
#   As with `dirname` and `basename`, a trailing '/' in the input path is ignored.
#   A '.' as the very first char. of a filename is NOT considered the beginning
#   of a filename suffix.
# EXAMPLE
#   splitPath '/home/jdoe/readme.txt' parentpath fname fnameroot suffix
#   echo "$parentpath" # -> '/home/jdoe'
#   echo "$fname" # -> 'readme.txt'
#   echo "$fnameroot" # -> 'readme'
#   echo "$suffix" # -> '.txt'
#   ---
#   splitPath '/home/jdoe/readme.txt' _ _ fnameroot
#   echo "$fnameroot" # -> 'readme'  
splitPath() {
  local _sp_dirname= _sp_basename= _sp_basename_root= _sp_suffix=
    # simple argument validation
  (( $# >= 2 )) || { echo "$FUNCNAME: ERROR: Specify an input path and at least 1 output variable name." >&2; exit 2; }
    # extract dirname (parent path) and basename (filename)
  _sp_dirname=$(dirname "$1")
  _sp_basename=$(basename "$1")
    # determine suffix, if any
  _sp_suffix=$([[ $_sp_basename = *.* ]] && printf %s ".${_sp_basename##*.}" || printf '')
    # determine basename root (filemane w/o suffix)
  if [[ "$_sp_basename" == "$_sp_suffix" ]]; then # does filename start with '.'?
      _sp_basename_root=$_sp_basename
      _sp_suffix=''
  else # strip suffix from filename
    _sp_basename_root=${_sp_basename%$_sp_suffix}
  fi
  # assign to output vars.
  [[ -n $2 ]] && printf -v "$2" "$_sp_dirname"
  [[ -n $3 ]] && printf -v "$3" "$_sp_basename"
  [[ -n $4 ]] && printf -v "$4" "$_sp_basename_root"
  [[ -n $5 ]] && printf -v "$5" "$_sp_suffix"
  return 0
}
test_paths=(
  '/etc/bash.bashrc'
  '/usr/bin/grep'
  '/Users/jdoe/.bash_profile'
  '/Library/Application Support/'
  'readme.new.txt'
)
for p in "${test_paths[@]}"; do
  echo ----- "$p"
  parentpath= fname= fnameroot= suffix=
  splitPath "$p" parentpath fname fnameroot suffix
  for n in parentpath fname fnameroot suffix; do
    echo "$n=${!n}"
  done
done
කාර්යය ක්රියාත්මක කරන පරීක්ෂණ කේතය:
test_paths=(
  '/etc/bash.bashrc'
  '/usr/bin/grep'
  '/Users/jdoe/.bash_profile'
  '/Library/Application Support/'
  'readme.new.txt'
)
for p in "${test_paths[@]}"; do
  echo ----- "$p"
  parentpath= fname= fnameroot= suffix=
  splitPath "$p" parentpath fname fnameroot suffix
  for n in parentpath fname fnameroot suffix; do
    echo "$n=${!n}"
  done
done
අපේක්ෂිත ප්රතිදානය - දාරයේ අවස්ථා සටහන් කරන්න:
- උපසර්ගයක් නොමැති ගොනු නාමයක්
- ආරම්භ වන ගොනු .( නොවේ යන ෙපර ෙයදුම ආරම්භයේ සැලකේ)
- ආදාන මාර්ගයක් අවසන් වේ /(පසුපස/යාම නොසලකා හරිනු ලැබේ)
- ගොනු නාමයක් පමණක් වන ආදාන මාර්ගය ( .මව් මාර්ගය ලෙස ආපසු ලබා දෙනු ලැබේ)
- පෙර .සැකසූ ටෝකනයට වඩා වැඩි ගොනු නාමයක් (අන්තිමයා පමණක් උපසර්ගය ලෙස සලකනු ලැබේ):
----- /etc/bash.bashrc
parentpath=/etc
fname=bash.bashrc
fnameroot=bash
suffix=.bashrc
----- /usr/bin/grep
parentpath=/usr/bin
fname=grep
fnameroot=grep
suffix=
----- /Users/jdoe/.bash_profile
parentpath=/Users/jdoe
fname=.bash_profile
fnameroot=.bash_profile
suffix=
----- /Library/Application Support/
parentpath=/Library
fname=Application Support
fnameroot=Application Support
suffix=
----- readme.new.txt
parentpath=.
fname=readme.new.txt
fnameroot=readme.new
suffix=.txt