Answer the question
In order to leave comments, you need to log in
How to make beautiful shell script output in cgi-bin?
There is apache2.2, in cgi-bin there is a shell script that should display the result of df -h, but it displays everything in one line.
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo '<html>'
echo '<head>'
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'
echo '<title>Sensors info</title>'
echo '</head>'
echo '<body>'
#df -h | grep "/dev/sda7"
df -h
echo '<br>'
echo '</body>'
echo '</html>'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question