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

LPI Exam 102-500 Topic 3 Question 76 Discussion

Actual exam question for LPI's 102-500 exam
Question #: 76
Topic #: 3
[All 102-500 Questions]

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

____ i in *.txt; do

echo $i

done

Show Suggested Answer Hide Answer
Suggested Answer: C, D, E

Contribute your Thoughts:

Hollis
1 months 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.'
upvoted 0 times
Goldie
8 days ago
I think it should be 'for' as well. That's how you iterate through files in a shell script.
upvoted 0 times
...
Stephaine
8 days ago
Yes, you're right. 'for' is the missing keyword in the code sample.
upvoted 0 times
...
...
Jesusita
1 months 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.
upvoted 0 times
...
Stephania
1 months ago
Easy peasy, the answer is 'for'. Bash scripts and 'for' loops go together like peanut butter and jelly.
upvoted 0 times
Lanie
15 days ago
I agree, 'for' is the missing keyword in the code sample.
upvoted 0 times
...
Marti
21 days ago
Definitely 'for', that's how you iterate through files in a directory.
upvoted 0 times
...
Ariel
27 days ago
A) for
upvoted 0 times
...
...
Carlota
1 months 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...
upvoted 0 times
...
Elise
2 months ago
The missing keyword is definitely 'for'. It's the classic way to iterate over a set of files in a shell script.
upvoted 0 times
Cyril
5 days ago
The 'for' keyword is essential for looping through files in this context.
upvoted 0 times
...
Johanna
9 days ago
It's important to use the right keyword for proper script execution.
upvoted 0 times
...
Tambra
9 days ago
Using 'for' is the correct way to iterate over files in a shell script.
upvoted 0 times
...
Catalina
23 days ago
I agree, 'for' is the missing keyword in the code sample.
upvoted 0 times
...
...
Georgene
2 months 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.
upvoted 0 times
...
Cristy
2 months ago
I agree with Fannie, the missing keyword is A) for because it is used to start a loop in shell scripts.
upvoted 0 times
...
Fannie
2 months ago
I think the missing keyword is A) for.
upvoted 0 times
...

Save Cancel