Hey all, I would have tried to do this in sed but the file is a bit large...
I have a CSV file (Asterisk) and I need to parse out a range of dates from it...
"","8605551212","1223","outbound","""RECEPTION"" <8605551212>","SIP/1201-08f42e80","SIP/1223-08e75548","Dial","SIP/1223|25|tr","2006-07-27 13:03:49",,"2006-07-27 13:04:10",21,0,"NO ANSWER","DOCUMENTATION"
"","8605551212","1223","outbound","""RECEPTION"" <8605551212>","SIP/1201-08f42e80","SIP/1223-08e75548","Dial","SIP/1223|25|tr","2006-07-27 13:03:49",,"2006-08-06 13:04:10",21,0,"NO ANSWER","DOCUMENTATION"
Normally I would first view the file (more filename) then get to a specific date, get a line count then wc -l it and print out those lines in sed...
sed -n '$LINE__NUMBER_BEGIN,LINE_NUMBER_ENDp' filename >> parsed
But I'm sure an awkpimp has a better solution....
I have a CSV file (Asterisk) and I need to parse out a range of dates from it...
"","8605551212","1223","outbound","""RECEPTION"" <8605551212>","SIP/1201-08f42e80","SIP/1223-08e75548","Dial","SIP/1223|25|tr","2006-07-27 13:03:49",,"2006-07-27 13:04:10",21,0,"NO ANSWER","DOCUMENTATION"
"","8605551212","1223","outbound","""RECEPTION"" <8605551212>","SIP/1201-08f42e80","SIP/1223-08e75548","Dial","SIP/1223|25|tr","2006-07-27 13:03:49",,"2006-08-06 13:04:10",21,0,"NO ANSWER","DOCUMENTATION"
Normally I would first view the file (more filename) then get to a specific date, get a line count then wc -l it and print out those lines in sed...
sed -n '$LINE__NUMBER_BEGIN,LINE_NUMBER_ENDp' filename >> parsed
But I'm sure an awkpimp has a better solution....