Skip to content

gtkdocize: don't backslash escape regular characters in grep

Thomas Haller requested to merge th/grep-stray-escape into master

Grep 3.8 warns about wrongly escaped characters:

$ echo | grep '\,'
grep: warning: stray \ before ,
$ echo | grep '\ '
grep: warning: stray \ before white space
$ echo | grep ' \-'
grep: warning: stray \ before -

Note that a '\-' as first character is OK, to not interpret the pattern as command line argument:

$ echo | grep '\--Wall'

#146 (closed)

Edited by Thomas Haller

Merge request reports