Hi I have a text file that look like this
P383 0 II-5 2 0 1/2 0 0 42.7 0 54.67 0
T528 0 P383 2 0 1/2 0 0 0 0 34.06 0
T529 III-8 0 2 0 0 0 0 0 0 37.74 0
T530 III-8 0 2 0 0 0 0 0 0 36.73 0
3B888 III-4 III-5 2 0 1/2 38.4 0 0 0 44.38 0
I want to replace the 0 in columns 2, 3 and 5 with " " (a blank), I know how to do it for one column
The desired output would be
P383 II-5 2 1/2 0 0 42.7 0 54.67 0
T528 P383 2 1/2 0 0 0 0 34.06 0
T529 III-8 2 0 0 0 0 0 37.74 0
T530 III-8 2 0 0 0 0 0 36.73 0
3B888 III-4 III-5 2 1/2 38.4 0 0 0 44.38 0
I know how to do it for a single column
awk '$3=="0"{$3=" "}; {print}' file
But how I do it for the three columns at the same time?
Thanks
awk '$2=="0" ; $3=="0" ; $5=="0" {$2=" ";$3=" ";$5=" "; print}' filedoes not produce the desired output, could you elaborate the answer please?