Questions tagged [ack]

0 votes
1 replies
how to exclude some of the matches from grep?
I am using grep to printout the matching lines from a very large file from which i got hundreds of matches, some of them are not interesting i wa...
asked 7 months ago
0 votes
0 replies
In ack, can I define a type that is restricted by both extension and first line (two filtertypes)?
If I understand correctly (from Defining your own types in ack --man), when I use --type-set in .ackrc (or at the command line) I can only use on...
asked 4 months ago
1 votes
1 replies
ack-grep throws <Invalid filter specification “tags”>
When I search with ack-grep I get this error, $ ack-grep SearchString Invalid filter specification "tags" at /usr/bin/ack-grep line 126. main::_...
ack
asked 6 months ago
0 votes
1 replies
Python Socket TCP receiver does not ACK correctly NoOS LWIP sender
I am trying to establish TCP communication between my PC and LWIP MCU. LWIP UDP and ICMP seems that work correctly. Note that LWIP works as TCP s...
asked 4 months ago
2 votes
1 replies
ack fails in cronjob but runs fine from commandline
I'm using ack as part of a bash script to build a list of MP4 files from a mysqldump. The dump file is about 15mb. Here's my line: ack -o "http...
asked 4 months ago
0 votes
1 replies
How to make ack stop after the first match?
I am trying to look for patterns in a file. The looks like this: aaa; bbb; If I try the following it does not stop: cat test | tr -d '\n' | a...
asked 3 months ago
2 votes
1 replies
Reliably checking wget log for errors using grep or ack
In a bash file, I have logfileA.txt that contains output from wget that I'd like to run grep on to check for any instances of the words "error" o...
asked 3 months ago
1 votes
2 replies
Can ack/ag/grep print function name?
Is it possible to print the function or class name in which a keyword occurs when using ack or ag? This is something I have highly desired for qu...
asked 3 months ago
0 votes
1 replies
Why typing same command in macOS bash gives divergent result as in jenkins bash script
I'm setting up jenkins freestyle job with bash script build step with ack command, Why I am not getting same result as from command bash on macOS...
asked 3 months ago
17 votes
1 replies
grep/ack -o with characters of context (not lines)
I'm trying to find a way to grep -o "somepattern" which gives me something like html/file.js 2:somepattern 5:somepattern but what would be r...
asked 7 years ago
4 votes
3 replies
Why do I get extra, unexpected results with my ack regex?
I'm finally learning regexps and training with ack. I believe this uses Perl regexp. I want to match all lines where the first non-blank charact...
asked 9 years ago
8 votes
2 replies
grep: repetition-operator operand invalid
I have this regular express (?<=heads\/)(.*?)(?=\n) and you can see it working here http://regexr.com?347dm I need this regex to work in the...
asked 6 years ago
4 votes
3 replies
Where should I put the ack configuration file on Windows?
I'm using ack (the grep replacement) on Windows XP under Strawberry Perl. Where should the .ackrc config file be placed, since ~/.ackrc is not re...
asked 9 years ago
24 votes
4 replies
ack: Exclude specific directories from search via regex
How do I ignore specific directories via RegEx with ack? I can use the --ignore-dir option, but this does not let me specify a RegEx. I want to...
asked 7 years ago
45 votes
2 replies
ack: Excluding only one directory but keeping all others with the same name
My folder structure looks like this: /app /app/data ... /app/secondary /app/secondary/data I want to recursively search /app, including /app/d...
ack
asked 9 years ago
71 votes
1 replies
Ignoring a directory using ack's .ackrc
I'm not sure what it's for, but the code I'm working on has a bunch of folders called "save.d," it looks like they're used for some sort of versi...
ack
asked 7 years ago
6 votes
3 replies
Add SCons files to ack searches
I love the code search utility ack. It is smart enough to look through Makefiles, but doesn't know about the SConstruct and SConscript files that...
asked 8 years ago
46 votes
4 replies
ack misses results (vs. grep)
I'm sure I'm misunderstanding something about ack's file/directory ignore defaults, but perhaps somebody could shed some light on this for me: m...
asked 9 years ago
10 votes
4 replies
Can I create an ack file type based on a filename, not extension?
I would like to include files with a specific name -- not an extension -- in my ack search. Is this possible with ack? If I use the -G option, t...
ack
asked 6 years ago
8 votes
3 replies
Getting ack to search through .htaccess or other dotfiles
Is there any way to get ack to search through a file whose filename starts with a . (e.g. .htaccess), without resorting to the --all or --unrestr...
asked 8 years ago
42 votes
2 replies
How to let ack support more filetypes?
in ack's home page, there lists a lot of file type, but without aspx, is it possible to let ack support it? 42 2 Answers...
ack
asked 8 years ago
10 votes
6 replies
Install ack-grep on CentOS
I went through fair amount of google search to install ack-grep on CentOS but I didn't find anything help. I also looked for the source codes but...
asked 5 years ago
65 votes
9 replies
How can I install and use ack library on Windows?
I have never used Perl, but I am really impressed by the ack, which I would like to use for source code searching, etc. Can anyone guide me of h...
asked 9 years ago
5 votes
2 replies
Unfamiliar shell syntax in ack-grep install script
From the ack installation page (http://betterthangrep.com/install/) there is a one-liner installation with curl: curl http://betterthangrep.com/...
asked 6 years ago
29 votes
4 replies
Ack — Ignoring multiple directories without repeating the flag
Is it possible to ignore multiple directories in Ack, without repeating the flag? e.g. I know the following works (i.e. setting multiple flags):...
ack
asked 4 years ago