Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does grep match all lines for the pattern "\'"

Tags:

regex

grep

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

grep "\'" input_file

matches all lines in the given file. Does \' have a special meaning for grep?

like image 425
perreal Avatar asked Jul 28 '12 08:07

perreal


1 Answers

grep regex GNU extension: ‘\'’ matches the end of the whole input

like image 190
Richard Sitze Avatar answered Sep 21 '22 08:09

Richard Sitze