Hello Guru,
I'm trying to insert a value between 2 fields (between last and second last field) But end up the script actually replacing the value in the second last field. What should i put to fix the problem?
Both methods are the same; the 1st one adds ,0 to the end of the next to the last field; the 2nd one adds 0, to the start of the last field. Putting two strings next to each other when assigning a string value to a variable concatenates those strings. Both use OFS (the awk output field separator) instead of a literal comma in case you change from a comma separated value file format to use some other field separator at some point in the future.