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
Amalia
12 hours ago
Why D?
upvoted 0 times
...
Carey
6 days ago
I think D and E are correct.
upvoted 0 times
...
Laura
24 days ago
I thought grep -i would include "red" too, but I guess not!
upvoted 0 times
...
Celeste
29 days ago
A is definitely wrong, it excludes everything with "fred".
upvoted 0 times
...
Catina
1 month 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
1 month 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
1 month ago
D and E are the way to go. Gotta love that case-insensitive grep!
upvoted 0 times
...
Shawnna
2 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
2 months ago
D and E look good to me.
upvoted 0 times
...
Sommer
2 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
2 months ago
I think option D is correct because it matches both "Fred" and "fred" using the character class.
upvoted 0 times
...
Jules
2 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
3 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
3 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
3 months ago
Wait, how does D work?
upvoted 0 times
...
Ena
3 months ago
Definitely agree with E!
upvoted 0 times
...
Billye
3 months ago
I think D and E are the right ones.
upvoted 0 times
...
Sanda
4 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
4 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
4 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
4 months ago
Hmm, this looks like a tricky one. I'll need to think carefully about the different options.
upvoted 0 times
...

Save Cancel