Connecting Tech Pros Worldwide Help | Site Map

Number of pages

Sven Dzepina
Guest
 
Posts: n/a
#1: Jul 17 '05
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.



Randell D.
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Number of pages



"Sven Dzepina" <mail@styleswitch.de> wrote in message
news:3f8bf8fb$0$20073$9b4e6d93@newsread2.arcor-online.net...[color=blue]
> 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.
>
>
>[/color]

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.


Closed Thread