001、Linux awk中如何删除数组
(base) [b20223040323@admin2 test]$ cut -f 5-6 rt288_2_3.bim | paste - <(cut -f 5-6 yt4_2_3.bim ) | head C A 0 A T C C T C A C A A C C A T G T G T C 0 C A C A C G A 0 A C A A C A G 0 G ## 声明数组 ## 删除数组 (base) [b20223040323@admin2 test]$ cut -f 5-6 rt288_2_3.bim | paste - <(cut -f 5-6 yt4_2_3.bim ) | awk '{for(i = 1; i <= NF; i++){ay[$i];if(i == NF) {print length(ay); delete ay}}}' | head 3 2 2 2 2 3 2 3 2 3
。
标签:删除,命令,如何,awk,数组,Linux From: https://www.cnblogs.com/liujiaxin2018/p/18295035