Loading ...
Sorry, an error occurred while loading the content.

File creation stuffs

Expand Messages
  • Bryan Irvine
    I have a script that is supposed to take a text file and create an html document. The way it works is by using cron and running
    Message 1 of 1 , Jan 2, 2003
    • 0 Attachment
      I have a script that is supposed to take a text file and create an html
      document.

      The way it works is by using cron and running

      /home/httpd/html/adv/zonedreport/zoned-creator.pl >
      /home/httpd/html/adv/zonedreport/index.html

      However, for some reason cron won't do it. It just creates and empty
      index.html file. If I run it by hand it works ok. So I'm thinking I
      will have to have the script itself create the file. I just don't know
      how.

      Here is the code I have so far.
      +++begin perl paste+++

      #!/usr/bin/perl

      @report = `cat /home/httpd/html/adv/zonedreport/dlyZonedSold`;
      $day = `date +'%a %b %D'`;
      print <<'EOM';
      <meta HTTP-EQUIV=Refresh CONTENT="300; URL=index.html">
      <table cellpadding='2' cellspacing='2' border='0' width='100%'>
      <tbody>
      <tr width='150'><td valign='top' width='150'>
      <img src='kcnlogo.png' width='150' alt='Logo'
      height='118'><br>
      </td><td valign='middle'>
      PBS Report dlyZonedSold<br>
      EOM
      #print "Generated $day";
      print <<'EOM';
      <br>
      <!--Time stamp maybe-->
      </td>
      </tr>
      </tbody>
      </table>
      <pre>

      EOM
      print @report;
      print "</pre>";

      +++end perl paste+++

      any help would be greatly appreciated.

      Thanks

      --Bryan
      --
      Bryan Irvine <bryan.irvine@...>
    Your message has been successfully submitted and would be delivered to recipients shortly.