On Tue, 10 Sep 2019 16:56:42 +0100, Raf Czlonka wrote: > How about ditching dirname(1)?
dirname(1) handles files in the root directory as well as files
with no directory correctly, your diff does not.
E.g.
FCODES=/foo
${FCODES%/*} -> ""
dirname $FCODES -> "/"
FCODES=bar
${FCODES%/*} -> ""
dirname $FCODES -> "."
I think it best to keep dirname rather than try to reimplement it
in the shell.
- todd
