I have a large .log file. I want to take each new line item (from last processed loop) to add to a simple database. The database can be a field or two.... I will make it however is best to accommodate the project.
here is a sample of the file:
05/03/11 16:49:51 U I - Ambassador- cmd=38238
05/03/11 16:49:52 U I - Ambassador- cmd=38017
05/03/11 16:49:57 U I - Ambassador- cmd=38013
05/03/11 16:49:57 S I - Ambassador- before exam display: DropRule = Memory Load(75 to 80), Tuning(+-0); ImageMem = 1055.5 MB; PhysicalMem = 1,276,993,536/3,220,701,184; Pagefile = 5,805,072,384/7,385,329,664 Virtual Avail =1,219,174,400/2,621,308,928 Memory load = 60
05/03/11 16:50:07 U I - Ambassador- cmd=38238
05/03/11 16:50:08 U I - Ambassador- cmd=38026
05/03/11 16:50:10 U I - Ambassador- cmd=41920
05/03/11 16:50:12 U I - Ambassador- cmd=38264
05/03/11 16:50:16 U I - Ambassador- cmd=38223
05/03/11 16:50:26 U I - Ambassador- cmd=38223
05/03/11 16:50:28 U I - Ambassador- cmd=41903
05/03/11 16:50:28 U I - Ambassador- cmd=38223
05/03/11 16:52:26 U I - Ambassador- cmd=38238
05/03/11 16:52:27 U I - Ambassador- cmd=38152
05/03/11 16:52:32 S I - (Begin) Save Image Edits.
============== now, there is much more to the log file, but each new record begins with a timestamp. So, how can I have a script loop and insert each row into a record on the database? It would be nice if it would insert "PROCESSED" or something on its own new line in the log file and on the next cycle, pick up from the last Procssed word.\
this would allow me to loop the script and really only process the new records.