Bug#547693: -P gives more newlines

View: New views
1 Messages — Rating Filter:   Alert me  

Bug#547693: -P gives more newlines

by jidanni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Package: grep
Version: 2.5.4-4
Severity: wishlist
X-debbugs-cc: bug-grep@...

grep -P seems to add newline here vs. perl.
$ LC_ALL=C /usr/bin/man perlfunc|perl -nwle 'print if /^\s+\?/'
               ?       Each letter may optionally be followed by a number giving a repeat count.  With all
               ?       The "a", "A", and "Z" types gobble just one value, but pack it as a string of length
               ?       Likewise, the "b" and "B" fields pack a string that many bits long.  Each character
               ?       The "h" and "H" fields pack a string that many nybbles (4-bit groups, representable
               ?       The "p" type packs a pointer to a null-terminated string.  You are responsible for
$ LC_ALL=C /usr/bin/man perlfunc|grep -P '^\s+\?'

               ?       Each letter may optionally be followed by a number giving a repeat count.  With all

               ?       The "a", "A", and "Z" types gobble just one value, but pack it as a string of length

               ?       Likewise, the "b" and "B" fields pack a string that many bits long.  Each character