Quote:
wanna use bash to update my html site
|
Okay, then use bash to create a CGI. For example:
Code:
#! /bin/bash
# isXeratulOnline.sh
#
/usr/bin/w | /bin/grep Xeratul
if [ $? -eq 1 ]; then
cat some/Html/Header/File.html
echo "Not online"
cat some/Html/Trailer/File.html
else
cat some/Html/Header/File.html
echo Online
cat some/Html/Trailer/File.html
fi
(left as an exercise to the reader to compose the header and trailer HTML files)
The script would have to be installed in the cgi-bin directory of your web server. Browsers would access the URL as
Code:
http://your.web.server/cgi-bin/isXeratulOnline.sh
It would tell people that you are logged into the server host.
--- rod.