我有這個代碼塊工藝路線:擊:如果已經在第二個文件
while IFS=$'\n' read -r line || [[ -n "$line" ]]; do
if [ "$line" != "" ]; then
echo -e "$lanIP\t$line" >> /tmp/ipList;
fi
done < "/tmp/includeList"
我知道這一定是非常簡單的。但是我有另一個列表(/ tmp/excludeList)。我只想在我的while循環中回顯該行,如果該行不在我的excludeList中。我怎麼做。有一些awk語句或什麼?
檢查內容:HTTP://theunixshell.blogspot.com/2012/12/file-comparisons-using-awk-match-columns.html – Vijay