摘要: 1、linux中awk中next命令相当于循环语句中的continue [root@centos7 test2]# seq 6 1 2 3 4 5 6 [root@centos7 test2]# seq 6 | awk '$0 ~ /5/ {next}; {print $0}' ## 当前行匹配5的 阅读全文
posted @ 2022-04-15 11:41 小鲨鱼2018 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1、测试 数据 [root@centos7 test2]# ls a.txt [root@centos7 test2]# cat a.txt T1 person1 person2 person3 T2 person1 person2 T3 person1 person2 person3 person 阅读全文
posted @ 2022-04-15 11:19 小鲨鱼2018 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos7 test]# ls test.fa [root@centos7 test]# cat test.fa >chr1 addgg ddges df >chr2 ertfg sdf >chr3 edret dfdff sfdfd d >chr4 iejie sdg 阅读全文
posted @ 2022-04-15 09:02 小鲨鱼2018 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos7 test3]# ls test.txt [root@centos7 test3]# cat test.txt deet dggh df 2、awk实现 [root@centos7 test3]# ls test.txt [root@centos7 test3 阅读全文
posted @ 2022-04-15 08:21 小鲨鱼2018 阅读(1081) 评论(0) 推荐(0) 编辑