1
vote
3answers
44 views

Is there anything grep does better than ack? [closed]

I started using ack a while ago and it's amazing, but still begs the question: Is there anything grep still does better than ack? Or maybe is there something grep does that ack can't do?
0
votes
1answer
31 views

Configure ack on a per-directory basis

My goal is to not have to always tell ack which directories to grep in a given project (if I don't, it's slow because it scans non-source folders as well). I've so far come up with puting an ...
2
votes
2answers
78 views

Opening search results with Vim ONLY if they exist

:) In my never-ending effort to get lazier, I am looking for a way to improve my "Open Grep/Ack-results in Vim"-snippet. What I'm currently using to open found files is: vim $(ack -il "pattern") ...
1
vote
1answer
260 views

Open all files in a VIM split window view with grep/ack command

I did a ack-grep on files that contain a string. I then want to open these files in a VIM veritcal split window view. How can this be done via the terminal?
1
vote
0answers
85 views

Why is grep faster than ack [closed]

I have access to, but no admin rights on, one of our Ubuntu production server, so I had to install the single file version of ack. I did a trial run (ack vs grep). The results are not impressive and ...
1
vote
1answer
366 views

How to ack-grep replace a string of multiple words

The following command replaces every occurence of the word from in any file of the current directory or its subdirectories with to: ack-grep -l --print0 --text from | xargs -0 -n 1 sed -i -e ...
2
votes
1answer
178 views

How to output a partial or a number from a mataching in grep or ack

I have a text file demo.txt like below. This is a line with id (9) This (8) is another line with id (10) This is a line with id too 11 This line does nothing The file has some lines with id ...
3
votes
1answer
1k views

Why doesn't ack recursively search all files by default?

From everything I can read ack-grep foo should search through all files in the current directory and subdirectories for the term "foo". However, the closest I can get is ack-grep foo * Which ...
1
vote
1answer
111 views

how to make 'ack' command print the filename that has found the result on every line

By default ack command prints the output in follwing way ack --jsp '</div>' a.jsp 5:</span></div> 10:</table></div> b.jsp 3:</div><div>xyz ...
2
votes
1answer
476 views

ack doesn't recurse when specifying a file pattern

ack "#define" will recurse into subdirs and find files that contain #define. But I wanted to limit the search to *.h files, so I tried ack "#define" *.h and it doesn't recurse anymore. The only ...
1
vote
2answers
167 views

Can I simulate ack by using grep with the right combination of options?

I have ack-grep installed on my local machine, and find it indispensable for quickly 'acking' through a codebase when debugging. However, on my cheap shared hosting, there is no ack-grep. One of the ...
1
vote
1answer
644 views

Is there a command in Mac OS X that can perform multiline regex searching?

I want to do a simple regex search recursively through a directory that isn't restricted to single lines. I tried grep and ack, but neither seem to support this. I know it shouldn't be too ...
11
votes
3answers
5k views

How to use ack to search for file name

I have started using ack which is much faster than grep. However using ack I want to search for file name rather than file contents. Is there a way to do that?
6
votes
1answer
725 views

grin, ack and rak comparison

Having used ack for some time now, I find it much better for my development purposes than grep. But then I've heard about rak and grin. Has anyone used all three of them and can provide a comparison? ...