grep常见操作整理(更新)
Posted 皮特王同学
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了grep常见操作整理(更新)相关的知识,希望对你有一定的参考价值。
提取邮箱和URL
[[email protected] ~]# cat url_email.txt [email protected],http://blog.peter.com,[email protected] [[email protected] ~]# egrep -o ‘[A-Za-z0-9._][email protected][A-Za-z0-9.]+\.[A-Za-z]{2,4}‘ url_email.txt [email protected] [email protected] [[email protected] ~]# egrep -o "http://[A-Za-z0-9.]+\.[A-Za-z]{2,4}" url_email.txt http://blog.peter.com
以上是关于grep常见操作整理(更新)的主要内容,如果未能解决你的问题,请参考以下文章