Solved

cygwin searching for a text in a folder having html texts

Posted on 2013-10-24
5
445 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

If your app took Google’s lash recently, here are the 5 most likely reasons.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
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.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

747 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

10 Experts available now in Live!

Get 1:1 Help Now