Hi All,
I have a large dat file where each lines are pipe delimited values. I need to parse the file depending on the request. For example: sometimes I have told to remove all the values in the 7th column (this case remove values '3333' only from the first line and '3543' from the second line) from the file. As the file contains thousands of lines, I need to find a way that can be done easily. I know it can be done by sed or perl but with my limited knowledge I am not able to figured it out.
Note that from time to time I need to remove values from nth column.
Input:
123456|ABC|Y||89575|456.7|3333|2014||A|
465273|SDE||N|46238||3543|1923|X|N|
Output:
123456|ABC|Y||89575|456.7||2014||A|
465273|SDE||N|46238|||1923|X|N|
Any help is greatly appreciated!