Let's say you have a log file that looks like this:
I/Profiling: TimeInterval1: 3271.72 ms I/Profiling: TimeInterval1: 3379.15 ms I/Profiling: TimeInterval1: 3645.32 ms ...and you want to extract all decimal numbers so that you can get the average, or plot them. Here's how you would use grep to do this:
grep -o ' [0-9]\+\.[0-9]\+' mylogfile.logThe -o option is for just printing the matching text and not the whole line.