Programming in almost language

This is the site where you may share your knowledge and experience to eachother..

  • Categories

  • LinkedIn

  • Tweet Me

  • My footsteps

  • Advertisements

Search a word or phrase in file(s) in Windows

Posted by Praveen Kumar on December 31, 2009

ack is a tool like grep (command for Unix ), designed for programmers with large trees of heterogeneous source code.

ack is written purely in Perl, and takes advantage of the power of Perl’s regular expressions.

To install the ack

Step 1 – click on

Step 2- Copy whole content and save the file lets say

Step3 – we need to run this file with perl. If perl is not install on your system

Stpe -4 Install Strawberry-perl

Step -5 After installing perl compile your with perl

perl c:\Bin\ %1 %2 %3 %4 %5

which will create command script in same directory

Step -6 Set the environment path of that command script

Now you are ready to find a word or phrase

C:\> ack —python class or you may use

C:\>ack classpython

class is the word which you are searching in all python file(s) in that directory.

see the File types that ack understands

if your file type is different you may set the type. lets say we want to find a word from kid template file.

create a file with name .ackrc and save it with ackrc extension and type


Now you may find your word/phrase by using

C:\>ack html –kid

Reference sites


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: