Question: Which sed options should you use to change the second-to-last instance of variable to rock so it would read:

  1. s/\(.*\)variable\(.*variable\)/\1rock\2/'
  2. s/variable/rock/'
  3. s/variable/rock/g'
  4. s/(.*\)variable\(.*variable\)/\1rock\2/'

Answer: The correct answer of the above question is Option A:s/\(.*\)variable\(.*variable\)/\1rock\2/'