"Event not found" error for shell command in unix
24,988
You're invoking the shell's history substitution. Surround the exclamation point with single quotes.
Author by
user1228191
Updated on July 09, 2022Comments
-
user1228191 over 1 year
when i am trying to remove consecutive duplicate lines with
awk "!x[$0]++" file
its reporting
x[: Event not found.
even the same case with
sed -i -e "$!N; /^\(.*\)\n\1$/!P;D" file
as well reportingN: Event not found.
i tried with single quotes too, it didn't helpAny idea to fix those