Creating and using ackrc

2022-04-02 1 min read Learning ack grep Fedora
ack is a fantastic replacement for grep and probably much more than grep. Here is what the dnf info has to say about ack 1 2 3 4 5 6 Name : ack Architecture : noarch Summary : Grep-like text finder URL : http://beyondgrep.com/ License : Artistic 2.0 Description : Ack is designed as a replacement for grep. And their websites says - Designed for programmers with large heterogeneous trees of source code, ack is written in portable Perl 5 and takes advantage of the power of Perl’s regular expressions. Continue reading

ack on solaris – grep recursively.

2010-06-25 2 min read Solaris
<span style="background-color: #ffffff;">Some days back I posted an article on ack <a href="http://blog.amit-agarwal.co.in/2009/08/24/more-powerful-grep-ack/" target="_blank">here. Today I was working on Solaris 9 and the default grep installed on the system does not have the &#8221;-r&#8221; option to search recursively. So, you know for all the time I had to keep using find with grep to work with directories recursively. This was something similar to the one below: <span style="background-color: #ffffff;">find . Continue reading

more powerful grep – ack

2010-05-26 2 min read bash Fedora
For last couple of days, I have been using ack instead of grep. Here is description of ack: Ack is designed as a replacement for grep. There are couple of reasons I am using ack. First and foremost being it does not require a filename. So, for seaching amit in all files recursively under the current directory I can simply use ack amit More reasons to use ack: It supports pager option and there can be a rc file that can be used to define the default options that needs to be used with ack. Continue reading

vim search multiple files

2010-03-25 1 min read Linux Vim Tips
Searching some pattern in multiple files is something that is required very often. There are multiple ways to do it, like <a class="zem_slink freebase/en/grep" title="Grep" rel="wikipedia" href="http://en.wikipedia.org/wiki/Grep">grep, <a class="zem_slink freebase/guid/9202a8c04000641f8000000006b66ec6" title="Ack (command-line utility)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Ack_%28command-line_utility%29">ack, find and so on so forth. But if your editor already has the capability to do that, then why leave your favourite vi and go to shell. I will point you to some scripts and some wiki pages on how to do this 🙂 Continue reading