I have multiple tab delimited files with same column names. An example file is attached as a snapshot.
Now, I would like to replace every 'INV' in coloumn 4 with 'RAC'. I wrote the following awk code. However it does not work well. Can anyone check my code?
#!/bin/bash
path=path/to/dir/containing/the/files/to/be/processed
for file in `ls $path`
do
echo processing $file
awk '{ if ($4 == "INS") {$4 = "RAC"; print} else { print }; }' $file> ${file}_new.txt
done;
