Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmasmnth

A penetration tester writes the following script to enumerate a /24 network:1 #!/bin/bash2 for i...

A penetration tester writes the following script to enumerate a /24 network:

1 #!/bin/bash

2 for i in {1..254}

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?

A.

Add do after line 2

B.

Replace {1..254} with $(seq 1 254)

C.

Replace bash with zsh

D.

Replace $i with ${i}

CompTIA PT0-003 Summary

  • Vendor: CompTIA
  • Product: PT0-003
  • Update on: Sep 5, 2025
  • Questions: 252
Price: $52.5  $149.99
Buy Now PT0-003 PDF + Testing Engine Pack

Payments We Accept

Your purchase with ExamsVCE is safe and fast. Your products will be available for immediate download after your payment has been received.
The ExamsVCE website is protected by 256-bit SSL from McAfee, the leader in online security.

examsvce payment method