Skip to main content
added 45 characters in body
Source Link
αғsнιη
  • 41.9k
  • 17
  • 75
  • 117

When field separator is space character, then:

awk 'BEGIN{ RS=-v FSRS=' }' index'index($0, "entry")' infile
awk 'BEGIN{ RS= FS } index($0, "entry")' infile

When field separator is space character, then:

awk -v RS=' ' 'index($0, "entry")' infile
Source Link
αғsнιη
  • 41.9k
  • 17
  • 75
  • 117

awk 'BEGIN{ RS= FS } index($0, "entry")' infile