sed - How to extract IP address using sed?

前端 未结 5 2058
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 23:36

This is for an assignment so I have no choice but to use sed.

Given a file messages, how can I extract all the IP addresses and print them?

I first

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 00:18

    Use sed -r (extended regex) or escape the capture groups with \

提交回复
热议问题