-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathack
More file actions
32 lines (17 loc) · 605 Bytes
/
ack
File metadata and controls
32 lines (17 loc) · 605 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ack
> A search tool like grep, optimized for programmers.
> More information: <https://beyondgrep.com/documentation/>.
- Find files containing "foo":
ack {{foo}}
- Find files of a specific type:
ack --ruby {{foo}}
- Count the total number of matches for the term "foo":
ack -ch {{foo}}
- Show the file names containing "foo" and number of matches in each file:
ack -cl {{foo}}
- Search a file for a specified string:
ack bar "{{foo bar}}" {{path/to/file}}
- Search a file for the specified regex pattern:
ack bar "{{[bB]ar \d+}}" {{path/to/file}}
- List all valid types:
ack --help-types