grepc PATTERN [FILE]
grepc -v PATTERN [FILE]
grepc -m=<MIN_OCCURRENCES> PATTERN [FILE]
PATTERN = an extended regular expression (ERE).
FILE = a relative or absolute path to a file or directory.
grepc searches for PATTERN in each FILE. If no FILE is given, recursively
searches the working directory.
grepc prints all matches and their amount of occurrences.
Printed matches are sorted: 1. descending by amount of occurrences, 2. ascending
alphabetically by matching string.
- Synopsis
- Description
- Table of Contents
- Options
- Usage examples
- Build from source
- Install
- Conventions
- Used third party applications
- Author and License
Minimum amount of occurrences. Matching string with less occurrences than the given amount are not printed.
Print a results summary additionally to the grep chart:
- amount of total matches
- amount of matching strings
- amount of files searched
Print information about installed version of grepc, its license and author(s).
Find strings that are enclosed in double quotes, with a minimum length of ten characters:
grepc '"[A-Za-z ]{10,}"' ./src
Output e.g.:
156 "White Christmas"
155 "Candle in the Wind"
154 "In the Summertime"
153 "I will always love you"
152 "Rock around the Clock"
151 "Its now or never"
150 "We are the world"
Note: to find strings that are enclosed in single quotes, these must be
escaped as: '\''
.
E.g.: grepc "'\''[A-Za-z]{4,}'\''"
Find floating numbers that have at least 14 decimal places.
grepc -v '(\d\.\d+){16,}' ./src
Output e.g.:
Found 177 matches in 83 out of 90 files.
There are 2 different matching strings:
91 3.14159265358979
86 2.71828182845904
cmake CMakeLists.txt; make
Build from source, than: sudo make install
The source code of grepc follows the Google C++ Style Guide, see: https://google.github.io/styleguide/cppguide.html
grepc follows the Semantic Versioning Scheme.
See CHANGELOG.md
Application | License |
---|---|
GNU Grep | GNU General Public License |
GNU wc | GNU General Public License |
grepc was written by Kay Stenschke and is licensed under the GNU General Public License V3.0
Permissions of this strong copyleft license are conditioned on making available
complete source code of licensed works and modifications, which include larger
works using a licensed work, under the same license. Copyright and license
notices must be preserved. Contributors provide an express grant of patent
rights.