Strange grep output

263 Views Asked by At

Shouldn't echo "ab" | grep "[A-B]" return nothing? Strangely it returns ab

LE: Apparently on older versions of Ubuntu (9.10) there's no problem, only 10.10 has this

2

There are 2 best solutions below

2
On

It doesn't return anything on my system.

1
On

Need use grep -i, to ignore case of characters