printing - awk: print columns based on values of another column -


i have file 6 columns, , want print first 2 columns of lines have value >3 in sixth column.

this statement prints lines sixth column > 3

awk '$6 > 3' file > out 

this statement prints first 2 columns:

awk '{print $1,$2}' file > out  

anyone knows how combine these 2 commands one-liner?

you there,just said, "combine them"! . try this:

awk '$6>3{print $1,$2}' file >out 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -