mirror of
https://github.com/adrlau/random-scripts.git
synced 2025-12-19 00:50:32 +01:00
initial commit - addded claunch and while-curl
This commit is contained in:
24
while-curl.sh
Executable file
24
while-curl.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#used by me for basic network and api resillient testing
|
||||
|
||||
#take inputs
|
||||
echo "Enter the url to curl: "
|
||||
read url
|
||||
echo "Enter the number of times to curl, or 0 for forever: "
|
||||
read num
|
||||
echo "Enter the time between curls in seconds: "
|
||||
read time
|
||||
|
||||
#run curl
|
||||
if [ $num -ne 0 ]; then
|
||||
for ((i=1;i<=$num;i++))
|
||||
do
|
||||
curl $url
|
||||
sleep $time
|
||||
done
|
||||
else
|
||||
while true
|
||||
do
|
||||
curl $url
|
||||
sleep $time
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user