Two questions:
1) Is there a way to create a new column (i.e. ID) to an existing file containing data and the new column ID populate as an auto incrementing number?
for example:
(Current file has headers and is PIPE delimited.)
2) Is there a way to replace an existing column with a New column for an existing file containing data. The new column would be "ID" and populate as an auto incrementing number?
for example:
(Current file has headers and is PIPE delimited.) data looks like this
The awk utility is perfectly capable of doing things like this. Please show us the awk code that you used to try to do this (in CODE tags). Maybe we can help you fix it so it does what you want.
The sed utility doesn't know how to perform arithmetic operations; so it is not usually a good candidate for projects like this.
I am not familiar with the ect utility. Please show us what you tried with that utility too (in CODE tags). Maybe someone else reading this thread will be familiar with that utility and will be able to help you fix that code.