☆☆☆★☆☆☆

唯有努力才能活成自己想要活成的样子

导航

shell的awk命令使用

例如案例: 

使用awk完成某几个数据筛选:

hdfs dfs -cat hdfs://192.16.1.1/txj/data/20200305/* >> tmp.txt

awk -F '|' '{if($1 != '0') print $1}' tmp.txt >> test.txt
sort test.txt >> s_.txt
uniq s_.txt >> u_.txt
cat u_.txt |wc -l

参考https://www.cnblogs.com/hepeilinnow/p/10331095.html,感谢该作者的总结

posted on 2020-04-18 16:13  Yr-Zhang  阅读(164)  评论(0编辑  收藏  举报