What is SSH commands for this: run 20 times, break 2 seconds, and repeated again

I am using centos

Please help what is SSH commands to do this:

run a command 20 times, break 2 seconds, and repeated again

so like this

will give rep +1 for all answered

  1. Create a file and call it script.sh
  2. Put this into the file:
#!/bin/bash
while :
do
    for i in {1..20}
    do
       wget http://test.com
    done
    sleep 2;
done
  1. Make file executable:

    chmod +x script.sh

  2. Run it:

    ./script.sh

2 Likes

This isn’t a reputation based site, that won’t help much :wink:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.