I have a file that possibly contains bad formatting (in this case, the occurrence of the pattern \\\\backslash). I would like to use grep to return
\\\\backslash
grep
To count the number of lines matched the pattern:
grep -n "Pattern" in_file.ext | wc -l
To extract matched pattern
sed -n '/pattern/p' file.est
To display line numbers on which pattern was matched
grep -n "pattern" file.ext | cut -f1 -d: