How to remove the milliseconds from timestamps with sed?

前端 未结 5 1744
迷失自我
迷失自我 2021-01-27 03:48

My input file is as follows:

12/13/2011,07:14:13.724,12/13/2011 07:14:13.724,231.56.3.245,LasVegas,US

I wish to get the following:

<         


        
5条回答
  •  离开以前
    2021-01-27 04:02

    This might work for you:

     sed 's/\....//;s/\....//' input_file.csv >output_file.csv
    

提交回复
热议问题