Solved

cygwin searching for a text in a folder having html texts

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
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…

726 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