awk + print the second field in line only if the four field is 0 -


The fourth field is not 0 (zero), so how to print $ 2 only by awk.

  line = "root 13246 11314 457 15: qsRw -m1"  

will print awk 13246, but if

 < Code> line = "root 13246 11314 0 15: qsRw-m1"  

then awk will not print anything

  awk '{if ($ 4) print $ 2;}' & lt; Input File  

Comments