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.