shell参考如下:
#!/bin/bash for h in `cat $1`;do [ `cat $2 | grep $h | wc -l` -eq 0 ]&&{ echo $h | tee -a ${2}.list }||{ continue } done echo '------------------------------------------------------------' for h in `cat $2`;do [ `cat $1 | grep $h | wc -l` -eq 0 ]&&{ echo $h | tee -a ${1}.list }||{ continue } done
标签:do,shell,list,echo,文本,continue,cat,对比 From: https://www.cnblogs.com/-courage/p/16927189.html