the output for the following two commands are same:
echo 'my\name' | grep 'my\\name'
my\name
and also the output for the next command is also same,
echo 'my\name' | grep 'my\\\name'
my\name
Can anyone pls guide why it is resulting in the same output?? Why an extra backslash also not affecting any change in the output?
however, if we increase the number of backslash to four in grep then the output goes away,
echo 'my\name' | grep 'my\\\\name'
no output
Pls guide me with the behavior of grep and backslash in single and double quotes.