/*****************************************************************/
/**                                                             **/
/**             (C) Copyright 1992 the Regents of the           **/
/**        University of California.  All Rights Reserved.      **/
/**                                                             **/
/**        This work was produced under the sponsorship of      **/
/**         the U.S. Department of Energy.  The Government      **/
/**                retains certain rights therein.              **/
/**                                                             **/
/**                         Written by                          **/
/**         Distributed Programming Environments Project        **/
/**           Computer Software and Networking Division,        **/
/**                   Livermore Computer Center,                **/
/**            Lawrence Livermore National Laboratory           **/
/**                                                             **/
/*****************************************************************/

/*
	Embedded Language for Remote Operations Services
	ELROS

	AUTHOR:		James A. Guse
			Network Systems Division

	DATE WRITTEN:	9/10/90


PURPOSE:


IN:

OUT:


CALLED ROUTINES:
	

	
MODIFICATION HISTORY:


*/

#include <stdio.h>


void general_error(e)

   char *e;

{
   fprintf(stderr,"%s\n",e);
   exit(1);
}


main(argc,argv)

   int argc;
   char *argv[];

{
   FILE *logfile;
#define LINESIZE 512
   char buf[LINESIZE];

   if (argc != 2)
      general_error("Usage: loganal filename");
   sprintf(buf,"tail +0f %s",argv[1]);
   if (!(logfile = popen(buf,"r")))
      general_error("open on log file failed");

   while (!feof(logfile))
   {
      fgets(buf,LINESIZE,logfile);
      fputs(buf,stdout);
      fflush(stdout);
   }

}
