1

Split file by column value

view story
linux-howto

http://www.unix.com – Please help me figure out whats wrong with my code, I have to split a file according to values in 3rd thru 6th column, If the 3rd or 4th col values are >0, row goes to 1 file, if 3rd and 5th are >0,row goes to another file...and so on... What is wrong with my code? It doesn't seem to work. No error but no output either, Sample input Code: chr7 16736 3 0 4 0 chr7 16737 4 0 4 0 chr7 16738 6 0 5 0 chr7 16739 6 0 5 0 chr7 16740 7 0 5 1 chr7 16741 8 0 5 1 chr7 16742 8 0 5 1 I tried. Code: awk -F"\t" '{     if( ($3 > '0')  &&  ($4 &gt (HowTos)