grep文本之间使用通配符 [英] grep for text with wild card in between

查看:1441
本文介绍了grep文本之间使用通配符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想grep诸如==> *.sh <==之类的东西.但这是行不通的,我可以将所有内容全部复制到.sh <==,但不能使通配符起作用.

I would like to grep something like ==> *.sh <==. But it doesn't work, I can grep everything up to .sh <== but not get the wild card to work.

这有什么窍门?

推荐答案

您需要对"==> .*\.sh <=="

.*部分匹配任何长度的字符,\.部分匹配点.

The .* part matches any character for any length, the \. part matches a dot.

这篇关于grep文本之间使用通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆