log.txt with sample output like these:
... 10-Feb-2022 15:15:14.099 lorem 10-Feb-2022 15:15:15.133 ipsum 10-Feb-2022 15:15:16.233 dolor ...
I expect the output of filtered log.txt will be
... 1644480914 lorem 1644480915 ipsum 1644480916 dolor ...
I have figured out how to convert date string to timestamp
date --date='10-Feb-2022 15:15:14.099' +"%s" Output: 1644480914
My brain still don't get it how to apply that date command to log.txt.
Also How do I pipeline that date command?
printf "10-Feb-2022 15.15.17.012 water" | date --date=<what must i put here?> + "%s"
I expect the output of pipelined command is same, the different is without disturb other column, that is