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 2 Question 82 Discussion

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

Given a file called birthdays containing lines like:

YYYY-MM-DD Name

1983-06-02 Tim

1995-12-17 Sue

Which command would you use to output the lines belonging to all people listed whose birthday is in May or June?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Matt
3 months ago
I think D) grep 06 birthdays | grep 05 is the correct answer because it specifically looks for birthdays in May and June.
upvoted 0 times
...
Marti
3 months ago
But wouldn't option C) grep '[0-9]*-0[56]-' birthdays also work?
upvoted 0 times
...
Paris
3 months ago
I disagree, I believe the answer is B) grep 05?6? birthdays.
upvoted 0 times
...
Marti
3 months ago
I think the answer is A) grep '[56]' birthdays.
upvoted 0 times
...
Lynna
3 months ago
Hold up, are we sure there aren't any people with birthdays on the 31st of June? Better cover all our bases with D, just to be safe.
upvoted 0 times
Elizabeth
2 months ago
Actually, I think we should use D) grep 06 birthdays | grep 05 to cover all possibilities.
upvoted 0 times
...
Arminda
2 months ago
I agree, let's go with D just to be safe.
upvoted 0 times
...
Zachary
2 months ago
I agree, let's go with A) grep '[56]' birthdays.
upvoted 0 times
...
Chantell
3 months ago
I think A) grep '[56]' birthdays would work just fine.
upvoted 0 times
...
Natalie
3 months ago
I think D is the safest option to cover all bases.
upvoted 0 times
...
...
Leah
3 months ago
I think D) grep 06 birthdays | grep 05 is the correct answer because it specifically looks for birthdays in May or June.
upvoted 0 times
...
Evette
4 months ago
Hmm, I'm leaning towards C. It's the most straightforward approach, and who doesn't love a good old-fashioned regular expression?
upvoted 0 times
...
Onita
4 months ago
D seems a bit convoluted. Why use two greps when you can do it in one shot with C? Efficiency is key, folks.
upvoted 0 times
Goldie
3 months ago
Agreed, C is the way to go. Keep it simple.
upvoted 0 times
...
Lorean
3 months ago
C is definitely more efficient. One command does the job.
upvoted 0 times
...
Gladys
3 months ago
D) grep 06 birthdays | grep 05
upvoted 0 times
...
Noe
3 months ago
C) grep '[0-9]*-0[56]-' birthdays
upvoted 0 times
...
...
Nickole
4 months ago
But wouldn't option C) grep '[0-9]*-0[56]-' birthdays also work?
upvoted 0 times
...
Tyra
4 months ago
I disagree, I believe the answer is B) grep 05?6? birthdays.
upvoted 0 times
...
Roxanne
4 months ago
I'd go with B. It's a bit more concise and readable than C, and it should get the job done just fine.
upvoted 0 times
Aliza
3 months ago
Yeah, B seems like the most straightforward choice.
upvoted 0 times
...
Ira
3 months ago
I think B is the best option.
upvoted 0 times
...
Robt
3 months ago
I'd go with B. It's a bit more concise and readable than C, and it should get the job done just fine.
upvoted 0 times
...
Elizabeth
3 months ago
B) grep 05?6? birthdays
upvoted 0 times
...
Chantay
4 months ago
A) grep '[56]' birthdays
upvoted 0 times
...
...
Nickole
4 months ago
I think the answer is A) grep '[56]' birthdays.
upvoted 0 times
...
Darell
4 months ago
Option C looks good to me. It matches the YYYY-MM-DD format and specifically searches for 05 or 06 in the month field.
upvoted 0 times
Bulah
3 months ago
Let's give it a shot and see the results.
upvoted 0 times
...
Alline
3 months ago
Should we try it out to see if it works?
upvoted 0 times
...
Iesha
4 months ago
I agree, it seems to be the most specific choice.
upvoted 0 times
...
Elke
4 months ago
I think option C is the correct one.
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