12 lines
466 B
Plaintext
Raw Permalink Normal View History

2019-10-20 16:24:07 -05:00
#=== FUNCTION ================================================================
# NAME: Basename
# DESCRIPTION: Replacement for basename(1) .
# PARAMETERS: NAME [SUFFIX]
# RETURNS: Print NAME with any leading directory components removed.
#===============================================================================
function Basename ()
{
local base=${1##*/}
echo ${base%$2}
} # ---------- end of function Basename ----------