[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18726: dirname & basename
From: |
Alan Stebbens |
Subject: |
bug#18726: dirname & basename |
Date: |
Tue, 14 Oct 2014 15:12:47 -0700 |
If dirname is given an argument of "-ANYTHING", it should return the empty
string.
If basename is given an argument of "-ANYTHING", it should return
"-ANYTHING".
Both of these functions check *syntax*; they do not test the existence of
the argument.
The "-" character is a legitimate filename character, and the path "-FOO"
is a filename path component (even if unwise).
Currently, both programs return an error about '-X' where 'X' is an invalid
option.
This error occurred in a script using "$0", eg: dirname $0, and the script
was started with 'bash', and '$0' was '-bash'.
--
Alan K. Stebbens
Software Architect
Ecorithm, Inc.
805-886-8886
- bug#18726: dirname & basename,
Alan Stebbens <=