Number of pages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sven Dzepina

    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|sh tml|htm|xhtml|x ml)))/i

    Gretting.



  • Randell D.

    #2
    Re: Number of pages


    "Sven Dzepina" <mail@styleswit ch.de> wrote in message
    news:3f8bf8fb$0 $20073$9b4e6d93 @newsread2.arco r-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|sh tml|htm|xhtml|x ml)))/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.


    Comment

    Working...