输出文件夹文件列表
find $PWD | grep jpg > out.txt # 这里以jpg文件为例
拼接两个txt文件
cat file1.txt file2.txt > out.txt # 将file1.txt 和 file2.txt拼接在一起,并输出到 out.txt
cat file2.txt >> file1.txt # 将 file2.txt 和 file1.txt拼接在一起,并输出到 file1.txt
两个txt文件取差/交集
# step - 1. sort the txt_files
sort file1.txt -o file1.txt
sort file2.txt -o file2.txt
# step - 2. get the A-B, B-A, A&B
comm file1.txt file2.txt -2 -3 # A - B
comm file1.txt file2.txt -1 -3 # B - A
comm file1.txt file2.txt -1 -2 # A & B
快捷统计文本信息
awk '$2>0.95&&$NF==0' files.txt |wc -l
awk '$NF==0' files.txt |wc -l