LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2006, 02:46 PM   #1
siko16v
LQ Newbie
 
Registered: Aug 2006
Posts: 1

Rep: Reputation: 0
Microsft ActiveX Update Help!


HI All

Bit of info about me, first, i am totally new to unix and linux, been brought up in a windows world i know i should explore. Well here i am, where windows cannot help me ive turned to linux!

Basically MS are rolling out a patch that will affect how IE handles ActiveX which will be a nuisance for me as i work with a learning management system that contains many web files that call activex files. Currently I would have to manually review 000's of files to see if files are calling activex objects etc..

I've been guided to use Cygwin and run a bash script using grep to locate the srings within files, but am struggling.

In an ideal world, i would like to run a script that runs through files/directories and lists file names, line numbers for files that contain some words, the files do not need all the words, but any word result in a listing.

So far ive found this:

find .-name "*.*" -exec grep -H -n applet {} \; outputfile.txt

I have no idea how i can get it to search for multiple words without having to run the above multiple times.

Any suggestions will be greatly appreciated, potentially i will lose a lot of content because of this new update!
 
Old 08-29-2006, 08:03 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
try:

find .-name "*.*" -exec egrep -H -n "applet|this|that|other" {} \; outputfile.txt

egrep allows for multiple patterns separated by
"pattern1|pattern2|patternn"

cheers
 
Old 08-30-2006, 09:42 PM   #3
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
Careful! There needs to be a space between the period and the dash:
Code:
find . -name "*.*"
That period means "the current directory".

And the switch, -name "*.*", doesn't do much for you. It only guarantees you will skip files that don't have a period in their name. Aren't all the files .html or .asp? Then you could do this. Using -iname instead of -name means case insensitive--that's probably a good idea on Windows.
Code:
find . -iname "*.asp" ...
What's "output.txt" doing out there? I think that was intended to collect all the output, but you are missing a redirection operator: >. Let me add two tweaks (space and '>') to what you've been given:
Code:
find . -name "*.*" -exec egrep -H -n "applet|this|that|other" {} \; > outputfile.txt
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsft TrueType Fonts on Linux AMD64 latino Linux - General 1 02-22-2005 05:36 AM
installing linux instead of microsft xp boudahsister Linux - Newbie 3 02-02-2005 07:02 AM
Microsft VPN behind a RG7.3 FW jameskilbane Linux - Networking 0 05-25-2004 12:03 PM
What can Microsft Windows do that Linux can't? Thulemanden General 16 03-15-2004 10:29 PM
microsft helping US to spy? qanopus General 20 07-03-2003 11:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration