CompTIA PenTest+ PT0-003 (V3) Practice Question

You are writing a Bash script that loops through a list of hosts, calls a scanning utility, and appends the results to a single file. Which approach meets these objectives in a repeatable manner?

  • Create a function that prompts for each address and merges results in memory for later display.

  • Use a for statement that runs the utility on each address, appending the output each time.

  • Use a while statement that reads each address, runs the utility, and overwrites the output file with each iteration.

  • Call the scanning utility once against all addresses at once, writing results to separate files.

CompTIA PenTest+ PT0-003 (V3)
Reconnaissance and Enumeration
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

SAVE $51
$425.00 $374.00
SAVE $57
CompTIA PenTest+ Voucher with Retake
v3 / PT0-003
Includes Retake
$474.00 $417.00
Bash, the Crucial Exams Chat Bot
AI Bot