initial commit - addded claunch and while-curl

This commit is contained in:
=
2023-02-08 11:47:11 +01:00
commit fcce1c25e1
4 changed files with 145 additions and 0 deletions

24
while-curl.sh Executable file
View 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