“未找到事件"unix 中的 shell 命令错误 [英] "Event not found" error for shell command in unix

查看:29
本文介绍了“未找到事件"unix 中的 shell 命令错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用

awk "!x[$0]++" 文件

它的报告 x[: Event not found.

即使是同样的情况

sed -i -e "$!N;/^(.*) 1$/!P;D" file 以及报告

sed -i -e "$!N; /^(.*) 1$/!P;D" file as well reporting

N:未找到事件.我也试过用单引号,它没有帮助

N: Event not found. i tried with single quotes too, it didn't help

任何解决这些问题的想法

Any idea to fix those

推荐答案

您正在调用 shell 的历史替换.用单引号将感叹号括起来.

You're invoking the shell's history substitution. Surround the exclamation point with single quotes.

这篇关于“未找到事件"unix 中的 shell 命令错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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