"Sven Dzepina" <ma**@styleswitch.de> wrote in message
news:3f***********************@newsread2.arcor-online.net...
Hello,
I have a question:
How I can count the number of pages on my Site simply? The Script should
follow the links in the HTML context.
I have developed a pattern, with help, for this problem:
/([\w]+:\/\/[\w-?&;#~=\.\/\@]+[\w\/](\.(html|php|shtml|htm|xhtml|xml)))/i
Gretting.
Do you want it to be dynamically updated?
Are you using Linux/Unix?
If you just want a quick count, on linux/unix, you could just do something
like
$ find . \( -name "*.htm?" -o "*.php" -o "*.shtml" -o "*.xhtm" -o "*.xml"
\) -print | wc -l
This will find the number of files then pipe the result thru to wc -l which
counts the number of lines (programs) returned...
Loose the "| wc -l" to see the files listed on their own.