查找a文件中不包含b文件的内容

!/bin/bash

cp remaining_for_clearing.manifest_bak remaining_for_clearing.manifest

cat s2l2-standalone.manifest |awk -F "|" '{print $1 "|" $2}' > S2L2.txt
cat s2l2-standalone.manifest |awk -F "|" '{print $3 "|" $4}' >> S2L2.txt
S2L2=cat S2L2.txt
for i in $S2L2
do
cat remaining_for_clearing.manifest| grep "$i" >> b.txt

done

grep -v -f b.txt remaining_for_clearing.manifest > a.txt
rm -f b.txt S2L2.txt

posted @ 2023-02-08 14:49  雨曼晴川  阅读(57)  评论(0编辑  收藏  举报