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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章