which command is used to print the lines which are having only one '\'
-
grep "^\$" filename
-
grep "^\\$" filename
-
grep "^\\\$" filename
-
grep "^\\\\$" filename
D
Correct answer
Explanation
This question tests shell escape sequence complexity - matching a literal backslash requires double escaping. The pattern needs to match a single backslash character at the start of a line. However, the escaping shown in the options is confusing and the question is poorly written with unclear shell context.