basename(1) defect

Stan Tsu stantheman0000@hotmail.com
Thu Nov 24 03:22:00 GMT 2005


This is a bug with basename 5.3.0 found in the latest Cygwin 1.5.15.1.
This used to work with basename in the March 2003 version.  Sorry I
don't know the version number any more because the update removed
the old version.

$ FCF=N/A
$ echo $FCF
N/A
$ Z=${FCF:(-1)}
$ echo $Z
A
$ FCG=`basename $FCF $Z`
$ echo $FCG
A                           <====== should return 'N/'

Another simpler way to see the bug:

$ basename NA A
N
$ basename N/A A
A                           <====== should return 'N/'

Even with quoting:

$ basename 'NA' A
N
$ basename 'N/A' A
A                           <====== should return 'N/'

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20051124/7c6ea8bf/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 17223 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20051124/7c6ea8bf/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list