linux 操作文件命令
1.多关键字筛选
cat test.txt | grep -E "AA|BB|CC" > test_key.txt
2.根据指定字符切分行,并取指定部分
cat test_key.txt | cut -d ',' -f 4 > monitor.txt
3.文件中按行去重(不加-c只有去重结果,-c统计频次)
sort monitor.txt | uniq -c > monitor_frequency.txt
linux 操作文件命令
1.多关键字筛选
cat test.txt | grep -E "AA|BB|CC" > test_key.txt
2.根据指定字符切分行,并取指定部分
cat test_key.txt | cut -d ',' -f 4 > monitor.txt
3.文件中按行去重(不加-c只有去重结果,-c统计频次)
sort monitor.txt | uniq -c > monitor_frequency.txt