up vote 0 down vote favorite
share [g+] share [fb]

Given a log of the following format

2009-11-11 13:13:44,716 INFO Something happened : problem description . Waited 3 seconds
2009-11-11 13:23:44,716 INFO Something happened : problem description . Waited 1 second
2009-11-11 13:33:44,716 INFO Something happened : some other problem description .

How can I extract just the strings which are between : and .?

link|improve this question

71% accept rate
feedback

2 Answers

up vote 3 down vote accepted

Maybe:

<logfile sed -e"s/^.* : \(.*\) \..*/\1/"
link|improve this answer
feedback
cat logfile | cut -f1 -d. | cut -f4 -d:
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.