Cyber Monday 2024! 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 4 Question 86 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 86
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:

Vilma
2 months ago
I'm feeling lucky, so I'm going with A and D. The -v option in A will exclude 'red', and D covers both cases. Fingers crossed!
upvoted 0 times
Argelia
26 days ago
User 3: I agree, D covers both upper and lower case for Fred.
upvoted 0 times
...
Tiffiny
1 months ago
User 2: I'm not so sure about A, but D seems like a safe bet.
upvoted 0 times
...
Janine
1 months ago
I think A and D are the right choices too.
upvoted 0 times
...
...
Francene
2 months ago
What, no option for 'grep Fred | sed 's/red//' data_file'? That would be my choice. Gotta love those one-liners!
upvoted 0 times
Sylvia
26 days ago
User 3: I'm not sure about those options. Maybe we should try them all to see which one works best.
upvoted 0 times
...
Lisbeth
1 months ago
User 2: Yeah, I agree. Option E) grep -i fred data_file should also do the trick.
upvoted 0 times
...
Ena
2 months ago
I think option D) grep '[Ff]red' data_file would work.
upvoted 0 times
...
...
Aimee
2 months ago
I'm not sure, but I think E) grep -i fred data_file might also work since -i ignores case.
upvoted 0 times
...
Shenika
2 months ago
I agree with Desiree, because using [Ff] will match both upper and lower case.
upvoted 0 times
...
Adell
2 months ago
This is a tricky one! I'm going to say C and E. The egrep command is like grep but with extended regular expressions, and the -i option makes it case-insensitive.
upvoted 0 times
Judy
29 days ago
I believe B and D are the correct commands to use.
upvoted 0 times
...
Dottie
1 months ago
I'm not sure, but I think A and D might be the right choices.
upvoted 0 times
...
Corinne
2 months ago
I would go with D and E, the -i option ignores case.
upvoted 0 times
...
Shakira
2 months ago
I think C and E are the correct options.
upvoted 0 times
...
...
Rima
3 months ago
I'm going with B and D. The [f]red pattern in B will match 'Fred' but not 'red', and D covers both upper and lower case.
upvoted 0 times
...
Rosio
3 months ago
Hmm, I think the answer is D and E. The -i option in grep makes the search case-insensitive, and the [Ff] character class matches both uppercase and lowercase 'Fred'.
upvoted 0 times
Carey
2 months ago
Great job on figuring that out!
upvoted 0 times
...
Mira
2 months ago
So, [Ff] matches both uppercase and lowercase 'Fred'.
upvoted 0 times
...
Clare
2 months ago
Yes, you are correct. The -i option makes it case-insensitive.
upvoted 0 times
...
Chaya
2 months ago
User2
upvoted 0 times
...
Sue
2 months ago
I think the answer is D and E.
upvoted 0 times
...
Josphine
2 months ago
User1
upvoted 0 times
...
...
Desiree
3 months ago
I think the answer is D) grep '[Ff]red' data_file.
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