Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这可能真的很简单,但我想知道如何将“全部拒绝”(“全部”后面有空格)添加到 IP 列表(可能超过 4,000 个)。
文件的每一行都包含一个 IP 地址。
尝试(未测试):
sed -e 's/^/Deny from all /' infile
使用 awk 执行此操作:
awk '{print "deny from all " $0}' < infile > outfile