#!/bin/bash


function do_wget()
{
    wget -O /dev/null -q 'http://localhost/mirrorlist?repo=fedora-18&arch=x86_64&ip=18.0.0.1'
}

function repeat_wget()
{
    while :; do
        do_wget
    done
}

function run_children()
{
    local num_children=$1
    for i in $(seq 1 ${num_children}); do
        repeat_wget &
    done
}


num_children=10
[ -n "$1" ] && num_children=$1
run_children ${num_children}
