BlackFriday 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
2 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
2 months ago
But wouldn't option C) grep '[0-9]*-0[56]-' birthdays also work?
upvoted 0 times
...
Paris
2 months ago
I disagree, I believe the answer is B) grep 05?6? birthdays.
upvoted 0 times
...
Marti
2 months ago
I think the answer is A) grep '[56]' birthdays.
upvoted 0 times
...
Lynna
2 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
1 months ago
Actually, I think we should use D) grep 06 birthdays | grep 05 to cover all possibilities.
upvoted 0 times
...
Arminda
1 months ago
I agree, let's go with D just to be safe.
upvoted 0 times
...
Zachary
1 months ago
I agree, let's go with A) grep '[56]' birthdays.
upvoted 0 times
...
Chantell
1 months ago
I think A) grep '[56]' birthdays would work just fine.
upvoted 0 times
...
Natalie
2 months ago
I think D is the safest option to cover all bases.
upvoted 0 times
...
...
Leah
2 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
2 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
2 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
2 months ago
Agreed, C is the way to go. Keep it simple.
upvoted 0 times
...
Lorean
2 months ago
C is definitely more efficient. One command does the job.
upvoted 0 times
...
Gladys
2 months ago
D) grep 06 birthdays | grep 05
upvoted 0 times
...
Noe
2 months ago
C) grep '[0-9]*-0[56]-' birthdays
upvoted 0 times
...
...
Nickole
2 months ago
But wouldn't option C) grep '[0-9]*-0[56]-' birthdays also work?
upvoted 0 times
...
Tyra
3 months ago
I disagree, I believe the answer is B) grep 05?6? birthdays.
upvoted 0 times
...
Roxanne
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
Aliza
2 months ago
Yeah, B seems like the most straightforward choice.
upvoted 0 times
...
Ira
2 months ago
I think B is the best option.
upvoted 0 times
...
Robt
2 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
2 months ago
B) grep 05?6? birthdays
upvoted 0 times
...
Chantay
2 months ago
A) grep '[56]' birthdays
upvoted 0 times
...
...
Nickole
3 months ago
I think the answer is A) grep '[56]' birthdays.
upvoted 0 times
...
Darell
3 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
2 months ago
Let's give it a shot and see the results.
upvoted 0 times
...
Alline
2 months ago
Should we try it out to see if it works?
upvoted 0 times
...
Iesha
2 months ago
I agree, it seems to be the most specific choice.
upvoted 0 times
...
Elke
3 months ago
I think option C is the correct one.
upvoted 0 times
...
...

Save Cancel