Article 5QDKW Create an Array or loop for automated the nmap scanning of a few ip's in Bash?

Create an Array or loop for automated the nmap scanning of a few ip's in Bash?

by
bmxakias
from LinuxQuestions.org on (#5QDKW)
Hello

Which is the best way to automate the nmap scanning of around 10 ip's like:

Code:192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
192.168.1.6
192.168.1.7
192.168.1.8Should i create a loop or an Array or combine both?

The final command should be:

Code:nmap -sT -oN /home/userx/Desktop/tests/output_ip1.txt 192.168.1.2So i can get for all ip's a separated .txt file with the results of each ip scan for each one like:

Code:output_192.168.1.2.txt
output_192.168.1.3.txt
output_192.168.1.4.txtetc

Thanks in advance !latest?d=yIl2AUoC8zA latest?i=8RFz2lC0ulU:mGljQc0ct_I:F7zBnMy latest?i=8RFz2lC0ulU:mGljQc0ct_I:V_sGLiP latest?d=qj6IDK7rITs latest?i=8RFz2lC0ulU:mGljQc0ct_I:gIN9vFw8RFz2lC0ulU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments