Connecting Tech Pros Worldwide Help | Site Map

Number of pages

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 12:32 AM
Sven Dzepina
Guest
 
Posts: n/a
Default Number of pages

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.




  #2  
Old July 17th, 2005, 12:32 AM
Randell D.
Guest
 
Posts: n/a
Default 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.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.