Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam LFCS Topic 1 Question 90 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 90
Topic #: 1
[All LFCS Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

I'm not sure, but I think it's either A) grep '/$' foo or C) grep -v '/$' foo
upvoted 0 times
...
Fatima
2 days ago
I agree with Mona, because the -v option in grep is used to invert the match
upvoted 0 times
...
Bette
2 days ago
Hmm, I think option C is the correct answer. The -v flag in grep is used to invert the match, so it will print the lines that don't end with a slash.
upvoted 0 times
...
Mona
12 days ago
I think the answer is C) grep -v '/$' foo
upvoted 0 times
...

Save Cancel