U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation LFCS Exam - Topic 4 Question 66 Discussion

Given a file called birthdays containing lines like:YYYY-MM-DD Name1983-06-02 Tim1995-12-17 SueWhich command would you use to output the lines belonging to all people listed whose birthday is in May or June?
C) grep '[0-9]*-0[56]-' birthdays
A) grep '[56]' birthdays
B) grep 05?6? birthdays
D) grep 06 birthdays | grep 05

Linux Foundation LFCS Exam - Topic 4 Question 66 Discussion

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

0/2000 characters
Davida
7 months ago
I'm surprised there's no option for just "grep -E '05|06'".
upvoted 0 times
...
Callie
7 months ago
Option D is just overcomplicating it.
upvoted 0 times
...
Lyda
7 months ago
Wait, why is nobody mentioning option B?
upvoted 0 times
...
Tom
7 months ago
Nah, I disagree. Option A seems simpler.
upvoted 0 times
...
Ivette
8 months ago
I think option C is the best choice.
upvoted 0 times
...
Aliza
8 months ago
I feel like option C might be the right choice since it looks like it’s checking for the month format, but I’m not entirely confident about the regex.
upvoted 0 times
...
Jovita
8 months ago
I’m a bit confused about the syntax. I thought we needed to specify the month more clearly, but I can't recall if that means using brackets or just numbers.
upvoted 0 times
...
Jennie
8 months ago
I practiced a similar question where we had to filter dates, and I feel like using a regex pattern with the month numbers would be the way to go.
upvoted 0 times
...
Vanda
8 months ago
I think I remember something about using grep for pattern matching, but I'm not sure which option captures both May and June correctly.
upvoted 0 times
...
Renea
8 months ago
I feel pretty confident about this one. Option C seems like the best choice - it's using a regex pattern to match the 05 or 06 month, which is exactly what the question is asking for. I think I'll go with that.
upvoted 0 times
...
Celeste
8 months ago
I'm a little confused by this question. The options all seem to be using different approaches to grep the file. I'm not sure which one is the most efficient or accurate. I might need to think this through a bit more before answering.
upvoted 0 times
...
Tammi
8 months ago
Okay, I think I've got this. Option C looks like the way to go - it's using a regex pattern to match the 05 or 06 month in the date. That should give me the lines I need for the May and June birthdays.
upvoted 0 times
...
Jenifer
8 months ago
Hmm, I'm a bit unsure about this one. I'm not sure if the regex in option C is the best way to handle it. Maybe I should try option B instead, it seems a bit more explicit in checking for May and June.
upvoted 0 times
...
Dorothy
9 months ago
This looks like a straightforward grep problem. I think I'll try option C - it looks like it's checking for the 05 or 06 month in the date format.
upvoted 0 times
...
Luke
9 months ago
Hmm, this one looks tricky. I'll need to carefully review the exhibits and options to figure out what's causing the warning.
upvoted 0 times
...
Elvera
9 months ago
Yep, I agree with that. A and D are the way to go.
upvoted 0 times
...
Skye
9 months ago
I don't remember ever discussing presolicitation in this context. I'm leaning towards "kickbacks" though.
upvoted 0 times
...
Herminia
9 months ago
I'm a bit confused by this question. It seems like the key issue is that the app is stopping after 60 minutes due to the Free pricing tier. Adding a continuous WebJob might not be the right solution since that's only available in higher tiers.
upvoted 0 times
...

Save Cancel