I try to parse log files - get some values from strings and write it into file
First, I get the list of files sorted by mtime.
find . -name log* -printf '%Tm%Tm%Td%TH%TM%TS %p\n'| sort | awk '{print $2}'
it works correctly and prints list of files
For example
./2015195/log/log.08
./2015486/log/log.10
./2015418/log/log.13
./2015415/log/log.14
./2015015/log/log.18
./2015715/log/log.19
./2015115/log/2015-09-10/log.21
...
Next, pass through this list and print words from lines with specific pattern
grep 'pattern' $(find . -name log* -printf '%Tm%Tm%Td%TH%TM%TS %p\n'| sort | awk '{print $2}') | awk '{print $1" "$4}' > prsd.txt
It works but it adds file name to every output line like
./2015195/log/log.08:02:01:09,811 12345ABCD
./2015195/log/log.08:02:02:01:09,975 12345CDEF
./2015195/log/log.08:12:02:02:01:09,978 12345EFGF
./2015195/log/log.08:02:02:01:10,223 12345LJIG
./2015195/log/log.08:02:01:10,275 12345IIUY
...
Here the problem, how to delete those additions?
thanks in advance.