#! /bin/bash test_name="Template test all good" config_file="default.config" port=4040 host="localhost" paths=("/") # you can add many methods=("GET" "POST" "DELETE") #methods=("GET") httpz=("HTTP/1.1") # the parts we will send to webserv # let main.sh handle the l1 l1="${methods[0]} ${paths[0]} ${httpz[0]}" header="Host: $host" body= run_this_test() { for i in "${methods[@]}" do l1="$i ${paths[0]} ${httpz[0]}" request="$l1\n$header\n$body\n" { echo "----- $test_name -----" echo -e "$_RED$request$_END" } >> telnet.out # } &>> test.log # } 2>>&1 # } &>> /dev/stdout echo -e "$request" # echo sleep 1 # { # echo -e "\n------\n" # } > /dev/stdout # echo -e "\n\n\n------\n\n\n" >> telnet.out # echo -e "\n\n\n------\n\n\n" &> /dev/stdout echo -e "\n\n" >> telnet.out # echo -e "\n\n------\n\n" >> telnet.out # echo -e "\n------\n" > /dev/stdout # run_a_test # echo done } # expected result...