?
Solved

cygwin searching for a text in a folder having html texts

Posted on 2013-10-24
5
Medium Priority
?
463 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Assisted Solution

by:loopfinity
loopfinity earned 2000 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 2000 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

649 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