Hi everybody,
I'm trying to replace the $98 field with "T" if the last field (108th) is T
I've tried
awk 'BEGIN{OFS=FS="|"} {if ($108=="T")sub($98,"T"); print}' test.txt
but that doesn't do anything
also tried
awk 'BEGIN{OFS=FS="|"}{ /*T.$/ sub($98,"T")} { print}' test.txt
but that doesn't seem to do anything either
---------- Post updated at 02:01 PM ---------- Previous update was at 01:52 PM ----------
I've also tried the below and that doesn't work either
awk -F"|" '/T.$/ sub( $98,"T")' test.txt