4
1
I'm trying to grep a line with a backslash at the end of the line like:
abc\
def
ghij
...
I hope it can grep the line "abc\". I tried the command below but they didn't work.
grep -EHn "\\$" test_file
grep -PHn "\\$" test_file
How should I solve this problem? I just don't know the logic of escape character in grep. The expression did work in vim.
It doesn't work on mine. GNU grep 2.6.3. Red Hat – Marcus Thornton – 2014-01-23T06:41:42.447