I have a pipe delimited file like below
TEST|RALPH|JACKSON|2|3|1 TEST|STEVE|PARKER|0|1|1 TEST|MARK|WOODS|0|1|1 TEST|DAVE|KNIGHT|1|3|1 TEST|JOHN|DOE|0|1|1
I want to filter the rows with non-zero value in columns 4,5 and 6 write it in a separate file.
I tried the following awk achieve this
awk -F "|" '$4 != 0 && $5 !=0 && $6 !=0' input.txt > output.txt
I would like to know if there is a better way to do this using awk.