if you are using tcsh:
set docroot='path to your html root directory'
find $docroot -name "*.html"> allhtml.list
foreach FILE (`cat allhtml.list`)
echo $FILE >> outhtml.list
grep 'link' $FILE >> outhtml.list
end

you can get more sophisticated than this, but this will work. then look
through outhtml.list, which will show all html files and the lines in those
files matching your link.

alternatively, you can do it in one line:
grep 'link'  `find $docroot -name "*.html"`> outhtml.list
so long as you don't have too many html files.

-----Original Message-----
From: Alan Halls [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 1:02 PM
To: [EMAIL PROTECTED]
Subject: Can anyone help with a search?


Hi,
 Ok, it is a little off the Mysql topic but I need to know something and I
know
someone out there can help. I need to do a search on a UNIX box using either
egrep or another command that will search for all occurances of a link. we
have updated part of our website and want to make sure there are no dead
links, a worthy goal don't you think. We need to do a text-based search that
includes sub-directories. Anyone know the command?
Alan Halls
Adoption.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to