Redirect output from multiple lines (group) in a script
#/bin/bash timestamp=$(date +%d/%h/%y_%H:%M:%S) context_root=$1 https_port=31001 app="${1}-service" status_code=$2 fake_host=$3 { echo -e "${timestamp}\nAPP: ${app}\nPORT: $https_port\nCONTEXT ROOT: $context_root\nHTTP_STATUS_CODE: ${status_code}"; echo -e "Requesting https://$(hostname):${https_port}${context_root}/info"; echo '{ "userId": 1, "id": 1, "title": "testing", "completed": false }' echo -e "\n"; } >> /logs/curl 2>&1