My file is now cleaned, sanitized & prepped:
07/07/2008 21:18:51 Installation 52016 complete *BUT NOTHING CHANGED*
07/21/2008 15:28:15 Removal 52016 complete
07/21/2008 15:34:15 Removal 55856 complete
12/08/2009 19:30:40 Installation 62323 complete
12/08/2009 19:39:06 Installation 64869 complete
12/09/2009 15:11:24 Preview 63753 complete
12/09/2009 15:16:21 Installation 63753 complete
01/20/2011 14:39:50 Preview 76441 complete
01/21/2011 8:56:40 Preview 76699 complete
01/24/2011 12:55:05 Installation 76441 complete
01/24/2011 12:58:24 Installation 76699 complete
the questions are
a) should I convert the date/time to unix datestamp/timestamp
b) is there an easy way to sed this from:
01/24/2011 12:58:24 Installation 76699 complete
to
INSERT INTO example (Date, Time, Type, Number, Status, Notes) VALUES (01/24/2011,12:58:24, "Installation", 76699, "complete","");
I don't mind multiple passes, but ....I'm struggling with the date time part as the first 2 col.
step 1;
's/^.*/INSERT INTO example (Date, Time, Type, Number, Status, Notes) VALUES (/' infile > outfile
