#! /bin/bash test_name="Valid URIs Test" config_file="./Tester/test1.config" port=4040 host="localhost" paths=("/" "/stylesheet/style.css" "/test/something.html" "/test/something.html/" "/test/" "/list" "/hilarious_404" "/redirect") # you can add many #paths=("/") # you can add many #methods=("GET" "POST" "DELETE") methods=("GET") httpz=("HTTP/1.1") l1="${methods[0]} ${paths[0]} ${httpz[0]}" header="Host: $host" body= run_this_test() { for i in "${paths[@]}" do l1="${methods[0]} $i ${httpz[0]}" request="$l1\n$header\n$body\n" { echo "----- $test_name -----" echo -e "$_RED$request$_END" } >> telnet.log echo -e "$request" sleep 1 echo -e "\n" >> telnet.log done } # expected result... files=() file="expected_valid_uri_test.txt" files+=("expected_valid_files_test.txt") local_expected_test_files=() test_path="" add_path() { for i in "${files[@]}" do local_expected_test_files+=("$test_path$i") done } #add_path