|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[bug #27323] without -i, \s is not respectedURL: <http://savannah.gnu.org/bugs/?27323> Summary: without -i, \s is not respected Project: grep Submitted by: pierre Submitted on: mer 26 aoû 2009 14:14:15 GMT Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: > grep -V GNU grep 2.5.3 (i didn't success in compiling the cvs version) I was wondering which one-letter options exists in grep $> man grep | grep -E "^\s+-[a-zA-Z][, ]" -L, --files-without-match -l, --files-with-matches it unescapes the s and look for (at least) "s-" $> man grep | grep -icE "^\s+-[a-zA-Z][, ]" 37 with -i switch, no problem $> man grep | grep -E "s-" -L, --files-without-match -l, --files-with-matches with bigger files, you know that the resulting regex is not only "s-" then i've concatened a lot of manpages to test $> grep -r . /usr/share/man/man* | cut -d" " -f3 > lsman $> for i in `cat lsman`; do man $i >> allman; done (this takes a lot of time, i stopped it when allman was 819101 lines, 39 Mib) $> grep -cE "^\s+-[a-zA-Z][, ]" allman 93 $> grep -icE "^\s+-[a-zA-Z][, ]" allman 9778 $> grep -cE "^ +-[a-zA-Z]+s-[a-zA-Z]" allman 369 (trying to find the regex who will bring to 93) $> grep -cE "^ +-[a-zA-Z][, ]" allman 9778 a space instead of \s is ok $> grep -iE "^\s+-[a-zA-Z][, ]" allman | sort -u > allopts i do that so i can send the file $> wc -l allopts 4877 allopts $> grep -cE "^\s+-[a-zA-Z][, ]" allopts 41 so i should grep all lines of allopts, but it takes only 41 (all containing "s-[a-zA-Z]") i'm not sure \s is ok to mean space, but why it is working with -i _______________________________________________________ File Attachments: ------------------------------------------------------- Date: mer 26 aoû 2009 14:14:15 GMT Name: allopts Size: 242 ko By: pierre <http://savannah.gnu.org/bugs/download.php?file_id=18645> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?27323> _______________________________________________ Message posté via/par Savannah http://savannah.gnu.org/ |
|
|
[bug #27323] without -i, \s is not respectedFollow-up Comment #1, bug #27323 (project grep): i just successed in compiling the cvs version $> ./grep -V GNU grep 2.6-cvs the bug is no more present because s has no more the meaning of space _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?27323> _______________________________________________ Message posté via/par Savannah http://savannah.gnu.org/ |
|
|
[bug #27323] without -i, \s is not respectedUpdate of bug #27323 (project grep): Status: None => Invalid Open/Closed: Open => Closed Summary: without -i, \s is not respected => without -i, s is not respected _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?27323> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ |
| Free embeddable forum powered by Nabble | Forum Help |