2014-10-02 02:02:25 +04:00
|
|
|
# ack
|
|
|
|
|
|
|
|
> A search tool like grep, optimized for programmers.
|
2019-06-03 03:06:36 +03:00
|
|
|
> More information: <https://beyondgrep.com/documentation/>.
|
2014-10-02 02:02:25 +04:00
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Find files containing "foo":
|
2014-10-02 02:02:25 +04:00
|
|
|
|
|
|
|
`ack {{foo}}`
|
|
|
|
|
2019-03-07 11:23:13 +03:00
|
|
|
- Find files of a specific type:
|
2014-10-02 02:02:25 +04:00
|
|
|
|
2019-02-28 17:15:48 +03:00
|
|
|
`ack --ruby {{foo}}`
|
2014-10-02 02:02:25 +04:00
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Count the total number of matches for the term "foo":
|
2014-10-02 02:02:25 +04:00
|
|
|
|
|
|
|
`ack -ch {{foo}}`
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Show the file names containing "foo" and number of matches in each file:
|
2014-10-02 02:02:25 +04:00
|
|
|
|
2015-10-28 11:33:06 +03:00
|
|
|
`ack -cl {{foo}}`
|
2019-03-07 11:23:13 +03:00
|
|
|
|
|
|
|
- List all valid types:
|
|
|
|
|
|
|
|
`ack --help=types`
|