Reputation: 23
I have a bash script and it include 2 variables, and like to print this on html, but the problem it just work the open tag and no the ending or closing tag:
echo <h2>${ADMIN_STATUS}</h2>
So the value on "ADMIN_STATUS" it is show on H2, the the html or bash no close and show on text "</h2>
"
I mean the bash no close the <h2>
, the </h2>
no are working.
any idea?
Thank you
Upvotes: 1
Views: 720
Reputation: 531918
The <
and >
are being treated as redirection operators. You need to quote them, which is most easily done by quoting the entire string:
echo "<h2>${ADMIN_STATUS}</h2>"
Upvotes: 1