BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI 702-100 Exam - Topic 6 Question 44 Discussion

Posted by Dan on Aug 15, 2025 at 01:47 PM

Consider the following file legal file:

disclosure

non-disclosure

non-disclosure

Which line or lines in the file does the following command match? Note the space after the dash within the brackets.

grep "non [-] disclosure" legalfile

Suggested Answer: E

Get Premium 702-100 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
18 comments · newest first
JE
Jennie 11 months ago
Just the non-disclosure lines, nothing else!
GR
Gracie 11 months ago
I thought it would match disclosure too, but it doesn't.
GR
Gracia 11 months ago
It matches both non-disclosure lines.
MA
Marguerita 12 months ago
Definitely B and C!
AM
Amie 12 months ago
Wait, are you sure about that?
RE
Renea 1 year ago
I’m confused about the space after the dash. Does that mean it won’t match anything? I thought it would match the non-disclosure lines, but now I'm not so sure.
LA
Launa 1 year ago
This feels similar to a practice question we did where we had to account for spaces. I think it might match both non-disclosure lines, but I could be wrong.
BE
Bettyann 1 year ago
I'm not entirely sure, but I remember something about how grep handles spaces in patterns. Does it mean it will only match if there's a space?
AL
Alberto 1 year ago
I think the command is looking for "non" followed by a space and then "disclosure," so it should match both non-disclosure lines.
JI
Jimmie 1 year ago
Yep, I agree with Emily. The answer is C, "non-disclosure only".
DA
Daniel 1 year ago
I think I've got it. The command will match both "non-disclosure" lines, since the pattern includes the space after the dash. The other lines won't be matched.
RU
Rutha 1 year ago
I'm a bit confused here. Does the space after the dash matter? And will it match both "non-disclosure" lines or just one?
TI
Tiffiny 1 year ago
Okay, let me break this down step-by-step. The grep command is looking for "non [-] disclosure", so it should match lines with "non-disclosure".
MI
Mignon 1 year ago
Hmm, this looks like a tricky grep question. I'll need to carefully read the command and think through the pattern matching.
OL
Olen 1 year ago
I think Sharee is mistaken, the command only matches 'non-disclosure' so the answer is B) non-disclosure only.
SH
Sharee 1 year ago
I'm not sure, but I think the answer might be D) disclosure and non-disclosure only.
FR
Freida 1 year ago
I agree with Lenny, because the command matches 'non-disclosure' exactly.
LE
Lenny 1 year ago
I think the answer is B) non-disclosure only.
0/2000 characters

Save Cancel