确认负前瞻给出错误
我在使用 ack-grep 进行负面展望时遇到问题。
我正在运行这个命令:
ack-grep "paypal_responded(?!_at)"
但我收到错误:
bash: !_at: event not found
我尝试在各个地方添加反斜杠,但我也是使用 ack & 的新手。 linux,所以请将我视为新手并提供任何说明。
提前致谢。
I have a problem with using ack-grep
with a negative look ahead.
I am running this command:
ack-grep "paypal_responded(?!_at)"
but I am getting the error:
bash: !_at: event not found
I have tried adding backslashes in various places, but I'm also new to using ack & linux, so please treat me as a newbie with any instructions.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 ack-grep 'paypal_responded(?!_at)'
您需要单引号以避免 bash 将
!
解释为历史扩展命令。Try
ack-grep 'paypal_responded(?!_at)'
You need single-quote to avoid bash interpret
!
as history expand command.shell 将您输入中的
!
解释为命令替换:您需要告诉 shell
!
没有特殊含义;有两种方法可以做到这一点:或
单引号字符串应用的转换较少:
The shell is interpreting the
!
in your input as a command substitution:You need to tell the shell that
!
has no special meaning; there are two ways to do that:or
Single-quoted strings have fewer transformations applied to them: