So I have a log.txt files which I can search in Notepad++ on Windows, however due to the sheer number of them, I'd like to be able to run grep on them. However, the data is formatted with non-rendering characters which I don't know how to include in my grep. Notepad++ shows them as the black RS. The format of the data is like [RS]value1[RS]value2
and I need to be able to grep for value1 AND value2. This format is always constant throughout these files.
How can I make grep search for this? Is there some form of escape sequence I can use? Or should I just make it search for value1
and value2
and completely ignore the presence of this non-rendering character?
[RS]value1[RS]value2
?grep "\[RS\]value1\[RS\]value2" file
should do the job'.value1.value2'
or$'\1evalue1\x1evalue2'
will work