foo
  • B. grep '/#' foo
  • C. grep -v '/ foo — The correct answer is C, as the -v option in grep inverts the match, thus selecting lines that do not end with a /. Option A will show lines that do end with a /, while options B and D do not pertain to the requirement of matching lines based on their ending character.","url":"https://certbase.pro/lpi/101-400/q/35"}}}
    foo
  • D. grep -v '/#' foo
  • Correct answer: C

    Explanation

    The correct answer is C, as the -v option in grep inverts the match, thus selecting lines that do not end with a /. Option A will show lines that do end with a /, while options B and D do not pertain to the requirement of matching lines based on their ending character.

    foo — The correct answer is C, as the -v option in grep inverts the match, thus selecting lines that do not end with a /. Option A will show lines that do end with a /, while options B and D do not pertain to the requirement of matching lines based on their ending character.","url":"https://certbase.pro/lpi/101-400/q/35"}}}