diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/xilib.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/xilib.sh b/src/lib/xilib.sh index 57dd10c..5c662a9 100644 --- a/src/lib/xilib.sh +++ b/src/lib/xilib.sh @@ -32,3 +32,15 @@ reverse_lines () { } +#!/bin/sh + +basename () { + name=$1 + suf=$2 + pre=${name%/*} + name=${name#$pre/} + + echo ${name#$suf} +} + +basename |