Need grep -v "Hello"
equivalent for AIX
Any idea by yourself?
Might I suggest:-
grep -v "Hello"
This should do what you need, according to how you describe it above.
More help might be available....
- if you have errors and you post them.
- if you have an input that gives unexpected output, and you post them.
Please remember to post all code, files, input & output/errors in CODE tags. It makes them easier to read and preserves multiple spaces for indentation or fixed-width data.
Robin
Do you want to know the equivalent option of "grep -v <String> <Filename>" in AIX?
-v flag in grep command is common and standard on all UNIX operating systems. So it will work on AIX.
Hi.
-v
Displays all lines not matching the specified pattern.
from man grep
, q.v.
for
aix 7.1.0.0
grep - ( /usr/bin/grep, Oct 01 2012 )
Best wishes ... cheers, drl
Now I'm not sure I understand the question.
Does "equivalent" mean something grep-like, but not grep? I don't know any grep that would not have the -v option (save for old Solaris, perhaps, or toy Linux's that you might install on Raspberry PI, etc.)
Even busybox has grep -v.
'grep -v' works as expected on my raspberry pi...
From the man page:
-v, --invert-match
Invert the sense of matching, to select non-matching lines. (-v
is specified by POSIX.)
;0)
It even supports the --invert-match "long" option.
Case closed