This is the expected behaviour of grep.  You're trying to use '+' to
mean "one or more matches", but that syntax is not a part of basic
regular expressions.  As Andrew Mitchell says, this will work in egrep
(or equivalently grep -E), which tells grep to use extended RE syntax.

Check "man regex" for further details.

** Changed in: grep (Ubuntu)
       Status: New => Invalid

-- 
echo 2 | grep '^[[:digit:]]+$' prints nothing
https://bugs.launchpad.net/bugs/132119
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to