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
Bash version
lineno=$(grep -n "pattern" filename) lineno=${lineno%%:*}