foo
  • B. grep '/#' foo
  • C. grep -v '/ foo — The correct answer is C, as the '-v' option in grep inverts the match, so it will show all lines that do not end with a '/'. Option A would display lines that do end with a '/', while B and D use incorrect patterns for the desired condition.","url":"https://certbase.pro/linux-foundation/lfcs/q/37"}}}
    foo
  • D. grep -v '/#' foo
  • Correct answer: C

    Explanation

    The correct answer is C, as the '-v' option in grep inverts the match, so it will show all lines that do not end with a '/'. Option A would display lines that do end with a '/', while B and D use incorrect patterns for the desired condition.

    foo — The correct answer is C, as the '-v' option in grep inverts the match, so it will show all lines that do not end with a '/'. Option A would display lines that do end with a '/', while B and D use incorrect patterns for the desired condition.","url":"https://certbase.pro/linux-foundation/lfcs/q/37"}}}