In my example, I have the following line in the script:
output=$(nslookup -type=txt "$domain") # in this example, $domain contains cnn.com
# so the actual command is: nslookup -type=txt cnn.com <return>
echo $output
Except the output contains multiple lines, when echo'ed, shows up as one big line without the CR/LF
What I want to be able to do is process each line that contains "$domain text = "some text" \n Could you recommend a way to process the return data so its formatted correctly, and if the line contains "$domain text = " to process it?