Tried these commands on F11 and F12 and I see this: # echo $LANG en_US.UTF-8 # echo '00000014 T is_nip_reserved' | env -uLANG grep -v ' [a-t] ' 00000014 T is_nip_reserved # echo '00000014 T is_nip_reserved' | env -uLANG grep -v ' [a-u] ' 00000014 T is_nip_reserved # echo '00000014 T is_nip_reserved' | grep -v ' [a-t] ' 00000014 T is_nip_reserved # echo '00000014 T is_nip_reserved' | grep -v ' [a-u] ' # All commands except last worked correctly. The last command erroneously filtered out the line. For some reason, ' T ' matched ' [a-u] ' regexp.
This is not a bug. strcoll's order is aAbBcCdDeE..tTuU, so [A-T] matches t but not a, and [a-t] matches A but not T. But, [a-u] does match T. See also info sed 'Reporting Bugs' (However, for some reason I cannot reproduce it with echo '00000014 T is_nip_reserved' | sed 's/ [a-u] / /p' under Fedora). Set LC_COLLATE=C to avoid this funny behavior.