-1

I want to make a loop in CentOS SSH Terminal where it loops over certain commands. For example:

  1. zmap -p22 -o mfu.txt -B100M -N 250000

    Waits until that's finished

  2. chmod 777 *

  3. ./update 1500

    Stops task after 25 mins

  4. perl wget.pl vuln.txt

  5. repeat the process

2 Answers 2

0

Do you want to parallelize step 1? Use parallel. Step 3../update is very broad. Do you want to update dataset/underlying programs? Dump output? For step 3.repeating and step 5.repeat you could use something like How to have a bash script loop until a specific time

Sign up to request clarification or add additional context in comments.

Comments

0

For step 5, do you want to repeat the process during a specific time (like step 3), or for a number of iterations ? For the second option you can do something like (with N iterations):

for i in $(seq 1 N); do execute steps 1 to 4; done

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.