[review,gdb/contrib] Improve words extraction in words.sh script
Commit Message
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/655
......................................................................
[gdb/contrib] Improve words extraction in words.sh script
Remove more punctuation and quoting in words.sh script.
gdb/ChangeLog:
2019-11-15 Tom de Vries <tdevries@suse.de>
* contrib/words.sh: Improve words extraction.
Change-Id: I1d9eea165731af4e6c4e1c7e09aed9b07af6395c
---
M gdb/contrib/words.sh
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Kevin Buettner has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/655
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
One small nit, otherwise it looks good to me. Just fix the tab - if it's actually missing - and then push.
| --- gdb/contrib/words.sh
| +++ gdb/contrib/words.sh
| @@ -124,17 +124,18 @@ if $c; then
| -- "$@"
| else
| cat "$@"
| fi \
| | sed \
| - -e 's/[%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
| + -e 's/[!"?;:%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
| -e 's/\[/\n/g' \
| -e 's/\]/\n/g' \
| + -e "s/'/\n/g" \
PS1, Line 132:
Is there a missing tab on this line?
| -e 's/[0-9][0-9]*/\n/g' \
| -e 's/[ \t]*//g' \
| | tr '[:upper:]' '[:lower:]' \
| | sort \
| | uniq -c \
| | awk "{ if (($minfreq == 0 || $minfreq <= \$1) \
| && ($maxfreq == 0 || \$1 <= $maxfreq)) { print \$0; } }" \
| | awk '{ print length($0) " " $0; }' \
| | sort -n -r \
@@ -126,9 +126,10 @@
cat "$@"
fi \
| sed \
- -e 's/[%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
+ -e 's/[!"?;:%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
-e 's/\[/\n/g' \
-e 's/\]/\n/g' \
+ -e "s/'/\n/g" \
-e 's/[0-9][0-9]*/\n/g' \
-e 's/[ \t]*//g' \
| tr '[:upper:]' '[:lower:]' \