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:

Dudley
5 days ago
I was about to choose option A, but then I realized that it would print the lines that *do* end with a slash, not the ones that don't. Good catch, Bette!
upvoted 0 times
...
Vanesa
9 days ago
I'm not sure, but I think it's either A) grep '/$' foo or C) grep -v '/$' foo
upvoted 0 times
...
Fatima
11 days ago
I agree with Mona, because the -v option in grep is used to invert the match
upvoted 0 times
...
Bette
12 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
21 days ago
I think the answer is C) grep -v '/$' foo
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77