我需要像哈希一样在文件中搜索。想知道 awk 是否是正确的解决方案
输入示例:
bla 123.123.123.0
# This line should be a comment
ble www.ble.com
bli <random whitespace> ::1
blo anything
根据上下文,我需要两个不同的输出:
获取密钥:
bla ble bli blo
并搜索(ble)
www.ble.com
我希望这是微不足道的awk
编辑:改进了输入格式的描述