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 66 Discussion

Posted by Lai on Dec 08, 2023 at 07:23 PM

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?

Suggested Answer: C

Get Premium LFCS Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
18 comments · newest first
DA
Davida 11 months ago
I'm surprised there's no option for just "grep -E '05|06'".
CA
Callie 11 months ago
Option D is just overcomplicating it.
LY
Lyda 12 months ago
Wait, why is nobody mentioning option B?
TO
Tom 12 months ago
Nah, I disagree. Option A seems simpler.
IV
Ivette 1 year ago
I think option C is the best choice.
AL
Aliza 1 year 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.
JO
Jovita 1 year 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.
JE
Jennie 1 year 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.
VA
Vanda 1 year 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.
RE
Renea 1 year 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.
CE
Celeste 1 year 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.
TA
Tammi 1 year 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.
JE
Jenifer 1 year 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.
DO
Dorothy 1 year 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.
LU
Luke 1 year ago
Hmm, this one looks tricky. I'll need to carefully review the exhibits and options to figure out what's causing the warning.
EL
Elvera 1 year ago
Yep, I agree with that. A and D are the way to go.
SK
Skye 1 year ago
I don't remember ever discussing presolicitation in this context. I'm leaning towards "kickbacks" though.
HE
Herminia 1 year 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.
0/2000 characters

Save Cancel