I have a huge file with many lines and columns. This file is using |~| as column separator.
I would like to replace the value .000000 on the 17 Column for nothing (in this case, erase this value in this specific column).
I tried use sed, but it is replacing the value in all columns. I don't know how specify the column 17.
sed -i 's/.000000//g' filename.txt
How the file is:
20201101 10:24:52.000000|~||~||~|SYSTEM|~||~||~||~|00001|~||~|000326|~||~||~||~||~||~|20201101 10:24:51.000140|~|**20201101 10:24:51.000000**|~|20201101 10:24:52.000912|~|
How I'm expecting the command result:
20201101 10:24:52.000000|~||~||~|SYSTEM|~||~||~||~|00001|~||~|000326|~||~||~||~||~||~|20201101 10:24:51.000140|~|**20201101 10:24:51**|~|20201101 10:24:52.000912|~|
Note: the column I want to change the value, have a different Date and Time for each line. So I just need to specify the column and the value I want to replace, not entire value on the column.
Need to delete last 7 characters on specific column on all lines that the file have value .000000
Thanks.