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