Artificial intelligent assistant

How to remove nanosecond from file How can I remove nanosecond from every line in a file. data looks like filename is **test.csv** ip,time,name 1.1.1.1,2018-08-17 15:05:52:016469121,1.13.0-0007 1.1.1.2,2018-08-17 15:05:52:016469121,1.13.0-0007

Try


sed 's/:[[:digit:]]*,/,/' file
ip,time,name
1.1.1.1,2018-08-17 15:05:52,1.13.0-0007
1.1.1.2,2018-08-17 15:05:52,1.13.0-0007


it will replace the last colon, following digits, and final comma with just the comma.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d3dd258f0954f97ecf6201da36e6d4a7