QuestionQ12

VerifiedEssential Commands

Which grep command prints only the lines in the file foo that do not end with a /?

Explanation

The pattern /$ matches a slash at the end of a line, and grep -v reverses the selection so that only nonmatching lines are printed.

Community Discussion

No comments yet. Be the first to start the discussion!