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 LFCS Exam - Topic 4 Question 106 Discussion

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

Which of the following commands will output all of the lines with the name Fred in upper or lower case but not the word red from the file data_file? (Choose two)

Show Suggested Answer Hide Answer
Suggested Answer: D, E

Contribute your Thoughts:

0/2000 characters
Robt
20 days ago
I’m leaning towards D and E too. Makes sense!
upvoted 0 times
...
Adolph
25 days ago
E handles that well.
upvoted 0 times
...
Luisa
1 month ago
B is too specific. What about the case sensitivity?
upvoted 0 times
...
Adolph
1 month ago
I prefer B and E.
upvoted 0 times
...
Carey
1 month ago
It matches both cases, Fred and fred.
upvoted 0 times
...
Amalia
2 months ago
Why D?
upvoted 0 times
...
Carey
2 months ago
I think D and E are correct.
upvoted 0 times
...
Laura
2 months ago
I thought grep -i would include "red" too, but I guess not!
upvoted 0 times
...
Celeste
2 months ago
A is definitely wrong, it excludes everything with "fred".
upvoted 0 times
...
Catina
3 months ago
Haha, good thing we don't have to worry about that 'red' word. D and E are the way to go!
upvoted 0 times
...
Rebbeca
3 months ago
D and E are the winners. Who needs to worry about that pesky 'red' word when you've got the power of grep?
upvoted 0 times
...
Fletcher
3 months ago
D and E are the way to go. Gotta love that case-insensitive grep!
upvoted 0 times
...
Shawnna
3 months ago
I think D and E are the correct answers. The -i option in grep is perfect for matching both upper and lower case.
upvoted 0 times
...
Timothy
3 months ago
D and E look good to me.
upvoted 0 times
...
Sommer
4 months ago
I'm not entirely sure, but I remember something about the -i flag making it case insensitive, so maybe option E is also right?
upvoted 0 times
...
Wendell
4 months ago
I think option D is correct because it matches both "Fred" and "fred" using the character class.
upvoted 0 times
...
Jules
4 months ago
Hmm, I'm not sure about the difference between grep and egrep here. I'll need to review the details of each option.
upvoted 0 times
...
Lyndia
4 months ago
I've got it! Options D and E should do the trick. The case-insensitive search will get all instances of "Fred", and the -v flag in option A will exclude "red".
upvoted 0 times
...
Dino
4 months ago
I'm a bit confused by the "not the word red" part. I'll need to double-check the options to make sure I don't include that.
upvoted 0 times
...
Ming
4 months ago
Wait, how does D work?
upvoted 0 times
...
Ena
5 months ago
Definitely agree with E!
upvoted 0 times
...
Billye
5 months ago
I think D and E are the right ones.
upvoted 0 times
...
Sanda
5 months ago
I’m confused about option A; it seems like it would exclude all lines with "fred," not just the word "red."
upvoted 0 times
...
Precious
5 months ago
I practiced a similar question, and I feel like option B might not work since it only matches "fred" in lowercase.
upvoted 0 times
...
Beckie
5 months ago
Okay, I think I know how to approach this. I'll need to use a case-insensitive search to get both upper and lower case "Fred".
upvoted 0 times
...
Lynsey
6 months ago
Hmm, this looks like a tricky one. I'll need to think carefully about the different options.
upvoted 0 times
Linsey
4 days ago
E is good for case insensitivity too.
upvoted 0 times
...
Chantell
9 days ago
Definitely! D captures both cases.
upvoted 0 times
...
Keneth
15 days ago
I think D and E are the best choices.
upvoted 0 times
...
...

Save Cancel