Menu

report generation using awk

Help
sam
2007-12-14
2012-07-26
  • sam

    sam - 2007-12-14

    do any one know how to generate reports using awk

     
    • Anonymous

      Anonymous - 2007-12-14

      Your question is much too terse for anybody to be able to give a useful answer.

      What exactly do you mean with "report"? What distinguishes a "report" from any random text?

      Awk is a quite general purpose programmable text processing filter. "filter" here means that it generally is used as a filter in the Unix tradition, i.e. reading one or several text files and outputting their contents in a more or less manipulated form. If you call the output from a certain awk script a "report", then yes, awk can be used to generate reports;)

      --tml

       
    • sam

      sam - 2007-12-17

      i wanted to know how awk can help in interpreting the data from log files of a website

       
      • Anonymous

        Anonymous - 2007-12-17

        Well, awk by itself has no knowledge of the format of website log files, or any other structured text format. All it knows about input formats is how to separate input into records ("lines") based on a record separator character (by default newline), and how to separate records ("lines") into fields based on a field separator character. You will have to write the awk script to interpret the log files yourself. For instructions how to do that, read the gawk documentation, and read some awk tutorials. Use Google.

        Anyway, for this task, my initial guess would be that it is such a common task that surely there must exist specialized tools ("freeware", or commercial) already that can analyze website log files in almost any way one might want. And if you insist in doing it yourself, or really need some kind of analysis such tools don't provide, I would also guess that a much more suitable language would be Perl, as I am pretty certain there exist Perl modules to interpret the log file formats of all common web servers. Or Python, for that matter.

        --tml

         
MongoDB Logo MongoDB