I have a delimited file with 10 fields. I have to replace a character in field 1 and field 5. It is possible to do using awk where i can read a row at a time field by field and if the field value is 1 or 5 then i will replace the character.
But this operation is cumbersome since the file size is huge and if the columns are more than 100.
Is there an option where i can do the operation on the field without looping through every field ie Directly act on the field 1 and field 5 without reading all the other field values as in my previous case.
Is there anyway I can achieve it without using the "\\". The reason is, I am going to do it for a set of characters in a set of fields. So i am going to generate the command based on the inputs, if I were to add the "\\" it becomes difficult to identify for which characters i need to prefix with \\.