Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI 102-500 Exam - Topic 3 Question 76 Discussion

Posted by Lilli on Mar 15, 2024 at 12:01 PM

What keyword is missing from this code sample of a shell script?

____ i in *.txt; do

echo $i

done

Suggested Answer: C, D, E

Get Premium 102-500 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
35 comments · newest first
ET
Ettie 11 months ago
"Until" makes no sense in this context.
AN
Anglea 11 months ago
Surprised it's not "loop"! That sounds right too.
KA
Kaitlyn 11 months ago
I thought it could be "while" at first.
CR
Cristy 12 months ago
Yeah, it has to be "for".
EV
Evelynn 12 months ago
Definitely missing "for" here.
JU
Justine 12 months ago
"Until" doesn't seem right, but I can't shake the feeling that there might be another keyword that fits here.
GE
German 1 year ago
I remember practicing a similar question, and I think "for" was definitely the right choice for looping through files.
LE
Lenna 1 year ago
I'm not entirely sure, but "while" seems like it could fit too, though it doesn't quite match the syntax I'm used to.
OL
Olen 1 year ago
I think the missing keyword is "for" since it looks like a loop that iterates over files.
EL
Elina 1 year ago
Wait, what? I'm a little confused by this question. Is the missing keyword "loop"? Or is it something else? I'll have to think about this a bit more.
LA
Lanie 1 year ago
Okay, let's see here. The code is iterating over a list of .txt files, so the missing keyword must be "for". I'm feeling good about this one.
HI
Hillary 1 year ago
Ah, I've seen this type of question before. The missing keyword is definitely "for". I'll select that option and move on to the next question.
KA
Kanisha 1 year ago
This looks like a pretty straightforward shell script question. I'm pretty confident I know the answer, but I'll double-check the syntax just to be sure.
AR
Arthur 1 year ago
Hmm, I'm a little unsure about this one. The missing keyword seems obvious, but I want to make sure I'm not overlooking something. Let me think this through carefully.
BE
Bernardo 1 year ago
Hmm, I'm not sure about this one. I'll need to double-check the package.json file and the server.js file to see if there are any specific instructions on how to start the server.
TO
Tora 1 year ago
I'm a bit confused by this question. I know there are public and private IP addresses, but I'm not sure how to distinguish them. I'll have to review my notes on IP addressing before answering this.
BR
Brande 1 year ago
Always watch out for keywords. 'Optimal drug use' suggests we want the most precise definition of when and how to use a medication. A looks most comprehensive.
HO
Hollis 1 year ago
The missing keyword is obviously 'for'. It's the equivalent of saying 'Hey, bash, please do this thing to each of these files for me.'
SH
Shanice 1 year ago
↳ replying to Hollis
Definitely 'for'. It's a common keyword used for looping through files in shell scripts.
GO
Goldie 1 year ago
↳ replying to Hollis
I think it should be 'for' as well. That's how you iterate through files in a shell script.
ST
Stephaine 1 year ago
↳ replying to Hollis
Yes, you're right. 'for' is the missing keyword in the code sample.
JE
Jesusita 1 year ago
I'm voting for 'for'. Can't imagine anyone would use 'until' or 'while' to loop over a set of files. Unless they're a secret agent trying to hack the CIA or something.
ST
Stephania 1 year ago
Easy peasy, the answer is 'for'. Bash scripts and 'for' loops go together like peanut butter and jelly.
LA
Lanie 1 year ago
↳ replying to Stephania
I agree, 'for' is the missing keyword in the code sample.
MA
Marti 1 year ago
↳ replying to Stephania
Definitely 'for', that's how you iterate through files in a directory.
AR
Ariel 1 year ago
↳ replying to Stephania
A) for
CA
Carlota 1 year ago
Hmm, I'd go with 'for'. Anything else just doesn't make sense in this context. Unless the exam writer is trying to trick us with some obscure bash syntax...
EL
Elise 2 years ago
The missing keyword is definitely 'for'. It's the classic way to iterate over a set of files in a shell script.
CY
Cyril 1 year ago
↳ replying to Elise
The 'for' keyword is essential for looping through files in this context.
JO
Johanna 1 year ago
↳ replying to Elise
It's important to use the right keyword for proper script execution.
TA
Tambra 1 year ago
↳ replying to Elise
Using 'for' is the correct way to iterate over files in a shell script.
CA
Catalina 1 year ago
↳ replying to Elise
I agree, 'for' is the missing keyword in the code sample.
GE
Georgene 2 years ago
I'm not sure, but I think the missing keyword is A) for as well. It makes sense to use it in this context.
CR
Cristy 2 years ago
I agree with Fannie, the missing keyword is A) for because it is used to start a loop in shell scripts.
FA
Fannie 2 years ago
I think the missing keyword is A) for.
0/2000 characters

Save Cancel