[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: All true assertions in a bash find one liner? ...



On 2/27/2020 6:40 AM, Albretch Mueller wrote:
  I need to find all files which names satisfy a pattern and contain a
certain string, then from those files I need to printf some metadata,
a la:
<snip>
  Instead of the lines of the first search by the extensions to look like:

"12/15/18 12:14:16.0000000000",1544872456,2542,"OK/OK00/OK00Test.java"
"12/15/18 11:28:49.0000000000",1544869729,85,"OK/OK00/OK00Test_main_cli_UTF-8.properties.txt"
"12/15/18 11:30:45.0000000000",1544869845,296,"OK/logs/OK00Test_20181215053045.0413_err.properties.txt"
"12/15/18 11:35:23.0000000000",1544870123,296,"OK/logs/OK00Test_20181215053523.0420_err.properties.txt"

  I want them formatted a la yyyy-mm-dd hh:mm:ss (or dd.mm.yyyy
hh:mm:ss, or whatever other way):

"2018-12-15 12:14:16",1544872456,2542,"OK/OK00/OK00Test.java"
"2018-12-15 11:28:49",1544869729,85,"OK/OK00/OK00Test_main_cli_UTF-8.properties.txt"
"2018-12-18 11:30:45",1544869845,296,"OK/logs/OK00Test_20181215053045.0413_err.properties.txt"
"2018-12-18 11:35:23",1544870123,296,"OK/logs/OK00Test_20181215053523.0420_err.properties.txt"

Sounds like a job for PERL.


Reply to: