h a l f b a k e r yBite me.
add, search, annotate, link, view, overview, recent, by name, random
news, help, about, links, report a problem
browse anonymously,
or get an account
and write.
register,
|
|
|
Please log in.
Before you can vote, you need to register.
Please log in or create an account.
|
I like Windows Search, and I like Google Desktop even
more, but they're still limited in their functionality. What
if
I want to search a whole folder of HTML files to make
sure
the number of left tags and number of right tags match?
What if I want to search the same folder for files not
containing
a DOCTYPE declaration? Proposed is a drive
indexer that accepts nontrivial SQL queries.
Example:
SELECT FileName FROM DriveC WHERE FolderName LIKE
'C:\\Inetpub\\wwwroot\\%' AND UPPER(FileName) like
'%.HTM%' AND UPPER(FileContents) NOT LIKE '%
<!DOCTYPE%' ORDER BY FolderName ASC, FileName ASC;
I, Kevin Durette, hereby release this idea into the public
domain if a lack of prior art allows me to do so.
Halfbakery: Commercial Database OS
Commercial Database OS I think you've described it better, but this was my attempt at trying to outline something like this. [zen_tom, Jun 10 2011]
[link]
|
|
Grab the Windows ports of common GNU utilities from http://unxutils. sourceforge.net/ or, better yet, grab Cygwin (and mintty) to get the same results and a heck of a lot more from a number of ubiquitous *nix text processing utilities. |
|
|
One of several ways to perform your example search in Cygwin is: |
|
|
find /cygdrive/c/inetpub/wwwroot -iname *.htm |while read filename; do grep -iL '<!DOCTYPE' "$filename"; done |sort |
|
|
(I'm certainly no shell guru; there may well be several better alternatives to my example). |
|
|
From one Windows user to another, it's well worth installing Cygwin and taking the time to learn the bash shell and common *nix command line utils. |
|
| |