Skip to main content
deleted 119 characters in body
Source Link
Ed Morton
  • 35.9k
  • 6
  • 25
  • 60

YouAssuming you only want to test the values in the 2nd column, you should be using either this:

awk '$2 ~ /entry/' file

ordoing this:

awk '$2 ~ /entry/{print $2}' file

depending on what you mean by Need to extract all entries with ... and assuming you only want to test the values in the 2nd column.

You should be using either this:

awk '$2 ~ /entry/' file

or this:

awk '$2 ~ /entry/{print $2}' file

depending on what you mean by Need to extract all entries with ... and assuming you only want to test the values in the 2nd column.

Assuming you only want to test the values in the 2nd column, you should be doing this:

awk '$2 ~ /entry/{print $2}' file
Source Link
Ed Morton
  • 35.9k
  • 6
  • 25
  • 60

You should be using either this:

awk '$2 ~ /entry/' file

or this:

awk '$2 ~ /entry/{print $2}' file

depending on what you mean by Need to extract all entries with ... and assuming you only want to test the values in the 2nd column.