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

Cisco 300-215 Exam - Topic 8 Question 116 Discussion

Posted by Glenn on Jun 27, 2026 at 09:56 AM

Which scripts will search a log file for the IP address of 192.168.100.100 and create an output file named parsed_host.log while printing results to the console?

Suggested Answer: B

To determine the correct script, we evaluate the following requirements:

The script must search for the IP address 192.168.100.100.

The output should be written to a file named parsed_host.log.

The matching lines should be printed to the console.

Analysis of the options:

Option A: Correct IP regex used and correct output filename, but reads from parsed_host.log instead of a source log file like test_log.log (not ideal for initial parsing).

Option C: The IP address used is 192.168.100.101 instead of 192.168.100.100 --- incorrect.

Option D: Same IP address and logic as Option B, but uses print statement without parentheses, which is not valid in Python 3 unless using Python 2 --- not ideal.

Option B:

Uses correct IP: '192.168.100.100'

Reads from test_log.log (presumably the source log file).

Writes to output/parsed_host.log.

Prints each matching line and writes to output file --- satisfying all conditions.


ChatGPT said:

Get Premium 300-215 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
23 comments · newest first
CA
Carmen 2 days ago
Same here, B feels solid.
KA
Katina 7 days ago
I’ll stick with B.
BO
Bobbye 12 days ago
D has too many steps.
JA
Jamal 17 days ago
D looks complicated.
KA
Kaitlyn 22 days ago
C is good, but does it print to console?
LA
Lauryn 27 days ago
I like C for its clarity.
CA
Carmen 1 month ago
But it might work for basic logs.
BO
Bobbye 1 month ago
A seems too simple though.
JA
Jamal 1 month ago
I prefer Option A.
KA
Katina 2 months ago
It uses grep and redirection.
KA
Kaitlyn 2 months ago
Why B?
KA
Katina 2 months ago
I feel like Option B is the right choice.
LA
Lauryn 2 months ago
I think it's about log parsing.
CA
Carmen 2 months ago
This question is tricky.
JA
Janessa 2 months ago
Not sure about this, can someone explain why B?
SH
Shala 3 months ago
Totally agree with Raina!
CA
Caitlin 3 months ago
Wait, is that IP even in the log file?
CO
Corazon 3 months ago
I think Option A looks better.
RA
Raina 3 months ago
Option B is the correct one!
GE
German 3 months ago
I practiced a question where we had to extract data from logs, but I’m confused about the differences in the options provided here.
LI
Lindsey 3 months ago
I feel like one of the options had a pipe to both the output file and the console, but I can't remember which one it was.
FA
Fabiola 4 months ago
I think the script needs to use grep or awk to filter the IP address, but I can’t recall the exact syntax for outputting to a file and console at the same time.
LO
Loren 4 months ago
I remember practicing a similar question about searching log files, but I’m not sure if it was specifically for an IP address.
0/2000 characters

Save Cancel