Multiple choice technology operating systems

which command is used to print the lines which are having only one '\'

  1. grep "^\$" filename
  2. grep "^\\$" filename
  3. grep "^\\\$" filename
  4. grep "^\\\\$" filename
Reveal answer Fill a bubble to check yourself
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.