I'm new to HTML, and I was able to print a simple linux date command on the web browser by calling the below script. However I'm trying to display the contents of the variable v on the web-browser and I cannot do it. What am I doing wrong? The batch file works fine when I run it from command line, in other words there were no errors.
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html>"
echo "<head>"
echo "Today is $(date)"
v=`ssh -t -q jcrm16 ". ~/.profile;/opt/reuters/scripts/matt/adsuserlist"`
printf "$v"
# echo $(printf "$v") << tried this did not work
echo "</body>"
echo "</html>"