| Posted by Koncept on 01/21/07 06:46 
In article <45b2547a$0$55713$dbd43001@news.wanadoo.nl>, Maxim Heijndijk<maccus_nospam@orange.nl> wrote:
 
 >      . ./genpages.conf
 
 What does this configuration file look like? Could you post a few
 lines? Everything else is a breeze to cover in PHP.
 
 BTW... Instead of using `expr` you can use the following syntax in bash
 and save a call to an external operation:
 
 NEXT=$(($LOOPCOUNT+1))
 
 You also have the option of coding your UNTIL loop:
 
 until [ "${LOOPCOUNT}" -ge "${PAGES}" ]; do
 
 like this:
 
 for ((i=0;i<=$PAGES;i++)); do
 # content...
 done
 
 And for the HTML bit, you could have used HEREDOC syntax so that you
 didn't have to escape all the sub-quotes:
 
 cat <<EOF > "${ROOTDIR}/${SUBDIR}/${LOOPCOUNT}.html"
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html;
 charset=utf-8"/>
 <title>This is a template</title>
 </head>
 <body>
 <!-- content -->
 </body>
 </html>
 EOF
 
 --
 Koncept <<
 "The snake that cannot shed its skin perishes. So do the spirits who are
 prevented from changing their opinions; they cease to be a spirit."  -Nietzsche
  Navigation: [Reply to this message] |