我有这段代码:
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)。如果在我的 excludeList 中找不到该行,我只想在我的 while 循环中回显该行。我怎么做。有什么 awk 声明之类的吗?