I am using awk to select lines which contain 1 to 18 respectively in column 1 in a file. I use command line as follow, and I got nothing in my output files. So anyone have a idea how could I modify my command line? Thank you in advance!
for k in `seq 1 18`; do zcat qc.vcf.gz | grep -v "^#" | awk '{if($1==$k) print$0}' > test${k}; done