Solved

cygwin searching for a text in a folder having html texts

Posted on 2013-10-24
5
450 Views
Last Modified: 2013-11-15
Hi there;

I just installed cygwin in my W7-64 bit to search for a text in a html file in a folder. What is the command for this?

or is there any other tool to do a fast search for a text folder having html files in it?

Regards.
0
Comment
Question by:jazzIIIlove
  • 3
  • 2
5 Comments
 
LVL 6

Assisted Solution

by:loopfinity
loopfinity earned 500 total points
ID: 39596692
Hi,

Why do not you use grep ?

grep -r "wordYouAreLookingFor" /folder1/*.html

best.
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 39596706
Hi,

I am pretty newbie. You meant to write this command in console of cygwin?

Regards.
0
 
LVL 6

Assisted Solution

by:loopfinity
loopfinity earned 500 total points
ID: 39596728
cygwing: "... provides a Linux-like environment to execute your commands "

you can run bash commands on it, just try basic commands like: ls, mv, etc.

for searching word from a file you can use grep command.
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 39596753
How can i set an alias for this command so that i don't write it again and again?
0
 
LVL 6

Accepted Solution

by:
loopfinity earned 500 total points
ID: 39596766
you have to modify .bashrc file;
http://www.cygwin.com/cygwin-ug-net/setup-files.html

alias wordInHtml='grep -r "wordYouAreLookingFor" /folder1/*.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
prezi for presentation 2 45
Windows 7 x64 won't update 8 81
How to find Linux Server's last patch date 9 37
Upgrade from Win7 Premium to Pro? 3 20
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now