What's the command to grep all lines in subdirectories with \\ (together)? I tried grep -r "\\\\" . but that also catches single \ and I don't know why it would.
Asked
Active
Viewed 35 times
0
Carbon
- 155
- 1
- 11
-
Related: [*Why does `echo -e "\\\SOME_TEXT"` show only one backslash?*](https://superuser.com/q/1249828/432690) – Kamil Maciorowski Jan 09 '18 at 20:15
-
Grep has the `-F` option for fixed strings (there is a wrapper too `fgrep`) `grep -F '\\'` could work. – Paulo Jan 09 '18 at 22:26
1 Answers
1
Put single quotes around the four backslashes so that bash doesn’t eat two of them.
Spiff
- 101,729
- 17
- 175
- 229