Why does grep match all lines for the pattern “\'”

后端 未结 4 750
挽巷
挽巷 2021-01-12 04:31

In this SO question there is something that I cannot explain:

grep \"\\\'\" input_file

matches all lines in the given file. Does \\\'

4条回答
  •  情书的邮戳
    2021-01-12 04:53

    \ is an escape character. This mean the the ' should considered as text to search for, and not as a control character.

提交回复
热议问题