The grep command that will print only the lines that do not end with a / in the file foo is:
C. grep -v '/$' foo
Explanation:
The option "-v" is used to invert the match, i.e., print lines that do not match the pattern.
The pattern is '/$' which matches lines ending with a /.
Therefore, "-v '/$'" matches lines that do not end with a /.
Option A matches lines that end with a /, which is the opposite of what is requested.
Option B matches lines that end with "/#" which is not relevant to the requested pattern.
Option D matches lines that contain "/#" which is also not relevant to the requested pattern.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
rona962
2 months, 4 weeks agorhylos
1 year, 12 months ago