0

i have the following command:

echo -n $i". "${!ip}" - " ;curl -X POST http://${!ip}:50333/api/v1/version; echo " "

I want the output to be green so what i did was

echo -n -e "\e[32m$i". "${!ip}" - " ;curl -X POST http://${!ip}:50333/api/v1/version; echo " "\e[0m"

but that returns the curl command in text and not the output.

  1. 192.168.1.232 - ;curl -X POST http://192.168.1.232:50333/api/v1/version; echo

how do i exclude the entire curl command from the text ""

1 Answer 1

0

You have also enclosed the semicolon and the curl command in quotes, so that also gets echoed.

Try:

echo -n -e "\e[32m$i ${!ip} - "; curl -X POST http://${!ip}:50333/api/v1/version; echo "\e[0m"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .