bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug report


From: Hactar
Subject: Re: bug report
Date: Fri, 28 Sep 2001 10:06:14 -0400 (EDT)

On Fri, 28 Sep 2001, GNU General Contact Address wrote:

> Remember to include the version number, machine architecture, input
> files, and any other information needed to reproduce the bug: your
> input, what you expected, what you got, and why it is wrong.

I think there's a bug with [[:...:]] handling in find.

26/0 address@hidden:/tmp/foo > uname -a
Linux pc 2.4.7 #1 SMP Sun Jul 22 23:06:18 EDT 2001 i686 unknown
27/0 address@hidden:/tmp/foo > find --version
GNU find version 4.1
34/0 address@hidden:/tmp/foo > ls -b
total 0
   0 \001     0 1     0 :     0 a
35/0 address@hidden:/tmp/foo > find . -name '[[:cntrl:]]' -print0 | xargs
-0 ls -b
./\001  ./:
36/0 address@hidden:/tmp/foo > find . -name '[[:alpha:]]' -print0 | xargs
-0 ls -b
./:  ./a
37/0 address@hidden:/tmp/foo > find . -name '[[:alnum:]]' -print0 | xargs
-0 ls -b
./1  ./:  ./a

It should not find the file named ':' in those searches.  It seems
'[[:cntrl:]]', '[[:alpha:]]' and '[[:alnum:]]' match ':', when they
shouldn't.

This 'bug' does not extend to 'tr':

53/0 address@hidden:/tmp > tr --version
tr (GNU textutils) 2.0
Written by Jim Meyering.

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
54/0 address@hidden:/tmp > cat -v testfile
^A : a 1

55/0 address@hidden:/tmp > tr '[[:cntrl:]]' b < testfile  | cat -v - ; echo
b : a 1bb
56/0 address@hidden:/tmp > tr '[[:alpha:]]' b < testfile  | cat -v - ; echo
^A : b 1


57/0 address@hidden:/tmp > tr '[[:alnum:]]' b < testfile  | cat -v - ; echo
^A : b b

-- 
-eben             address@hidden           http://home.tampabay.rr.com/hactar/
TAURUS:  You will never find true happiness - what you gonna do, cry about
it?  The stars predict tomorrow you'll wake up, do a bunch of stuff and then
go back to sleep.  -- Weird Al, _Your Horoscope for Today_




reply via email to

[Prev in Thread] Current Thread [Next in Thread]