shell while 双循环对比查找共有字段

#!/bin/bash

#查找两个文件中的共有字段
while read line
do
    while read line2
    do
        if [[ $line -eq $line2 ]]
        then
            echo $line2
        fi
    done < aaa.txt

done < bbb.txt

原文地址:https://www.cnblogs.com/z977690557/p/13346550.html