Multiple choice technology operating systems

What is the advantage of grep over awk with reference to decision-making scripts?

  1. grep shows different values for $? while awk always shows $?=0
  2. grep is faster and works on rows level

  3. awk can only work on field level

  4. grep has -i option which can be used for ignoring case.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Grep's exit status reflects pattern matching results - returning 0 when matches are found and 1 when no matches exist - making it ideal for script decision-making based on $? Awk always returns exit code 0 regardless of match outcomes, so it cannot signal match/non-match conditions through the exit status variable.