hi all,
quick question,
I want to change the data of a field while i am reading from a file. let me explain
sample file
ID Deptno Sal Name
123 A20 3000 Tom
234 D50 2900 Harry
when i am reading the file and reformatting the file i want the result to be
ID Deptno Sal Name
123 A20 3000 XXXXX
234 D50 2900 XXXXX
i tried this awk -F, '{$4 = "XXXXX"; print }' OFS=, but when the script is in the config file it is asking for a value for $, any other way of doing this.
Thanks in advance
quick question,
I want to change the data of a field while i am reading from a file. let me explain
sample file
ID Deptno Sal Name
123 A20 3000 Tom
234 D50 2900 Harry
when i am reading the file and reformatting the file i want the result to be
ID Deptno Sal Name
123 A20 3000 XXXXX
234 D50 2900 XXXXX
i tried this awk -F, '{$4 = "XXXXX"; print }' OFS=, but when the script is in the config file it is asking for a value for $, any other way of doing this.
Thanks in advance