Valid PT0-003 Dumps shared by ExamDiscuss.com for Helping Passing PT0-003 Exam! ExamDiscuss.com now offer the newest PT0-003 exam dumps, the ExamDiscuss.com PT0-003 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PT0-003 dumps with Test Engine here:
A penetration tester writes the following script to enumerate a 1724 network: 1 #!/bin/bash 2 for i in {1..254}; do 3 ping -c1 192.168.1.$i 4 done The tester executes the script, but it fails with the following error: -bash: syntax error near unexpected token `ping' Which of the following should the tester do to fix the error?
Correct Answer: A
The error in the script is due to a missing do keyword in the for loop. Here's the corrected script and explanation: * Original Script: 1 #!/bin/bash 2 for i in {1..254}; do 3 ping -c1 192.168.1.$i 4 done * Error Explanation: * The for loop syntax in Bash requires the do keyword to indicate the start of the loop's body. * Corrected Script: 1 #!/bin/bash 2 for i in {1..254}; do 3 ping -c1 192.168.1.$i 4 done Adding do after line 2 corrects the syntax error and allows the script to execute properly.