0

Okay, so when I check the man egrep output, I see the word recur appear in many places.

One of those places is in the "--recursive" part of the man egrep file.

But, why doesn't it get found when I search the egrep output?

The following does not catch the "--recursive" part of the man egrep file:

man grep | grep -i "recur"

But why not?

makansij
  • 9,303
  • 37
  • 105
  • 183

2 Answers2

1

Pipe to od -c to see that bold words are emboldened two letters at a time

man grep | od -c

\b   g   r  \b   r   e  \b   e   p  \b

the lines you miss are bold.

djna
  • 54,992
  • 14
  • 74
  • 117
0

Even though you are seeing many places where the token "recur" occurs, what you are not seeing are the control characters hidden between the characters - r, e, c, u, r. The control chars are being interpreted by your shell. In reality, in the entire man page, there are only a few places where those 5 chars appear continuously without any control (hidden) characters between them.

Try this:

man grep > text.out
vim text.out

Find the line that you are talking about. You will see the control characters being shown by vim.

euphoria83
  • 14,768
  • 17
  • 63
  • 73