?
Solved

cygwin searching for a text in a folder having html texts

Posted on 2013-10-24
5
Medium Priority
?
461 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 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