Actually it was my bad! I'm getting get the results now, however I would like additional format and column; allow me to illustrate.
This pretty much the log:
HTML Code:
05-25-2010 21:45:49 1616 1615 0 0 0 0 0 0 0
05-23-2010 21:55:49 1495 1493 0 0 0 3 0 0 0
05-23-2010 22:05:49 1750 1750 0 0 0 0 0 0 0
05-24-2010 22:15:49 1839 1837 0 0 0 0 1 0 0
05-24-2010 22:25:49 1693 1687 0 0 0 3 1 0 1
05-25-2010 22:35:49 1614 1609 0 0 0 3 4 0 0
05-25-2010 22:45:49 1599 1594 0 0 0 0 3 0 0
I tried using the awk portion of your script, but couldn't get it to work.
HTML Code:
#!/bin/bash
echo "You must type the date in this format ---> MM-DD-YYYY"
read vdate
grep $vdate /log/log.csv |awk -F, '{print $1, $2, $3, $12, $13, $14, $15, $16, $17,$18}' |tee /tmp/bk_$vdate.csv
However now I would like I would like the output to display:
1. Time format instead of 22:35:49 I want just 22:35
2. I would like to insert a percentage column between 3 and 5, please see below for the actual results.
HTML Code:
1 2 3 4 5 6 7 8 9 1011
05-25-2010 22:35:49 1614 1609 0 0 0 3 4 0 0
05-25-2010 22:45:49 1599 1594 0 0 0 0 3 0 0
Actual output without date column
HTML Code:
1 2 3 4 5 6 7 8 9 1011
22:35 1614 1609 96% 0 0 0 3 4 0 0
Percentage Calculation
I've been at this all night so I'm gonna try and get some sleep now.
Any help would be appreciated.
Thanks again Bakunin!