linux 中awk 命令同时指定多个分割符

 

001、

[root@pc1 test3]# ls
a.txt
[root@pc1 test3]# cat a.txt            ## 测试数据
ad_33;hh_kk
dd;ff;dd;77
uu_77_88_99
[root@pc1 test3]# awk -F "[_;]" '{print $2}' a.txt   ## 同时指定_和;为分割符
33
ff
77

 

posted @ 2022-11-16 18:02  小鲨鱼2018  阅读(300)  评论(0编辑  收藏  举报