By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,637 Members | 3,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,637 IT Pros & Developers. It's quick & easy.

Number of pages

P: n/a
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.

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"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.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.