How can I filter some output only by certain column?
I need something like this:
tail -f logs/access_log | grep -v "200" --only-in-column=1
So I want to see only lines that don't have string '200' in first column.
OS: Linux
|
feedback
|
|
awk is probably the canonical tool for this kind of problem.
| |||||||
feedback
|
|
This will work:
which excludes lines that begin with "200" followed by a space or a tab. You can choose different delimiter sets depending on your needs.
which excludes lines that begin with "200" followed by any character other than alphabetic or numeric characters. | |||
|
feedback
|