Article 4YMNF cannot see the echo sshpass output in my portal

cannot see the echo sshpass output in my portal

by
patrik_
from LinuxQuestions.org on (#4YMNF)
Hello guys,

Thanks for allow me to be part of this community. I very new at Linux and I'm running my first project. So far I guess is working however when I want to display the output of a command in the html portal I dont see anything. Here is the bash:

#!/bin/bash
read -p "Mac given: " Add

if [ "$1" != "" ] ; then
Add=$1
fi

echo "Content-type: text/html"
echo $Add <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<this output is visible and i can confirm that what ever I receive from the PHP script is correct

echo ""
echo "<html><head><title>Bash as CGI"
echo "</title></head><body>"

echo "<center><h1>Find the information below</h1></center>"

echo $(sshpass -p XXXXX ssh XXXXXX@XXXXX show mac address-table address $Add) >>>>> Here is where it fails. If I run the batch I can see the output but if I go the portal I dont see anything.

echo ""
echo "<center>INITIAL TEST</center>"
echo "</body></html>"

Any help will be much appreciated !latest?d=yIl2AUoC8zA latest?i=UJIi6VIZwJA:KIn5DYJNO9w:F7zBnMy latest?i=UJIi6VIZwJA:KIn5DYJNO9w:V_sGLiP latest?d=qj6IDK7rITs latest?i=UJIi6VIZwJA:KIn5DYJNO9w:gIN9vFwUJIi6VIZwJA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments