telemorgan
MIS
I am looking to write a script that will read in a log file line by line, extract the values between the two sets of quotes, output those values to another file then exit. My log file is a number of lines like the following:
152.15.112.88:1755 ssl "(CN=Hung\,Bart,CN=Users,DC=company,DC=com)@(LDAP)" "15/Apr/2008:10:26:38.779 -0400" v5 connect 13552
I know how to read the log file in line by line and I know how to output the values once I found them. The question I have is how can write something to extract the characters between the two sets of quotes.
Like this:
(CN=Hung\,Bart,CN=Users,DC=company,DC=com)@(LDAP)
15/Apr/2008:10:26:38.779 -0400
Thanks in advance
152.15.112.88:1755 ssl "(CN=Hung\,Bart,CN=Users,DC=company,DC=com)@(LDAP)" "15/Apr/2008:10:26:38.779 -0400" v5 connect 13552
I know how to read the log file in line by line and I know how to output the values once I found them. The question I have is how can write something to extract the characters between the two sets of quotes.
Like this:
(CN=Hung\,Bart,CN=Users,DC=company,DC=com)@(LDAP)
15/Apr/2008:10:26:38.779 -0400
Thanks in advance