Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bash under SunOS

Status
Not open for further replies.

Drone38

Programmer
Apr 12, 2000
29
0
0
BE
I've done a shell under SunOS but it doesn't work. Have the function "read" a specific syntax or synopsis under SunOS

PS: my shell work under Apache server for Win2000 an HP UX
 
Hi Drone,
In which part of the script is giving the problem. I don't think there is no such big difference between HP and Sun OS. If possible give some extract of the script.

Suresh.
 
Here is the code of the cgi
It display the entry of the filoe "site"

#!/bin/bash
function begin
{
echo "Content-type: text/html"
echo ""
echo &quot;<HTML><HEAD><TITLE>Top site par Drone38®</TITLE>
<META http-equiv=Content-Type content=\&quot;text/html; charset=iso-8859-1\&quot;>
<META content=\&quot;MSHTML 5.50.4134.600\&quot; name=GENERATOR></HEAD>
<BODY text=#000000 vLink=#ffffff aLink=#ffffff link=#FFFFFF bgColor=#00003f>
<FORM action=/cgi-bin/Vote.cgi method=get>
<table width=400 heigth=200 border=0 align=center>
<tbody>
<tr bgcolor=#909090>
<td>
<center>
<FONT face=Tahoma size=5 color=#ff9000><B>Drone38 pr&amp;eacute;sente:</B><BR><BR></FONT>
<FONT face=Tahoma size=5><B>Top site</B><BR><BR></FONT>
</center></td>
</tr>
</tbody>
</table><br><br><TABLE width=&quot;100%&quot; border=0><TBODY>
<TR bgcolor=\&quot;#909060\&quot;><TD vAlign=top align=left width=138 bgcolor=\&quot;909060\&quot; height=\&quot;200\&quot;>
<P><FONT face=Tahoma>Login :<BR>
<INPUT maxLength=15 size=12 value=Nom name=name>
<BR>
<INPUT type=password maxLength=15 size=12 value=Password name=pass width=\&quot;10\&quot;></FONT></P>
<P><FONT face=Tahoma><A href=\&quot;NewSite.html\&quot;>Ajouter un site</A></FONT></P><P><FONT face=Tahoma><A href=\&quot;NewCompte.html\&quot;>Ajouter un compte</A></FONT></P>
<P align=left><FONT face=Tahoma><A href=\&quot;about.htm\&quot;>About</A></FONT></P>
</TD><TD vAlign=top align=left width=855 rowspan=\&quot;2\&quot; height=\&quot;200\&quot;>&quot;
}
function fichier
{
ifs=&quot;$IFS&quot;
IFS=¤
let r=&quot;0&quot;
let ln=&quot;-1&quot;
exa=false
let c=&quot;1&quot;
while read ad ti code n
do
echo &quot;<TABLE width=\&quot;100%\&quot; border=0><TBODY><TR bgcolor=\&quot;#909090\&quot;><TD><A target=_blank href=\&quot;$ad\&quot;><FONT face=Tahoma>$ti</FONT></A></TD></TR>&quot;
if [ $n != $ln ]
then
if [ $exa = true ]
then
let r=&quot;$r+$c&quot;
let c=&quot;1&quot;
exa=false
else
let r=&quot;$r+1&quot;
fi
else
exa=true
let c=&quot;$c+1&quot;
fi
ln=$n
echo &quot;<TR><TD><FONT face=Tahoma>$code</FONT></TD></TR><TR><TD><FONT face=Tahoma>${r}eme place. Le site a obtenu :$n votes.</td><tr><td>&quot;
echo &quot;<INPUT type=submit name=Voter value=$ad></FONT></td></tr></TR></TB></table>&quot;
done
IFS=&quot;$ifs&quot;
echo &quot;</TD></TR></TBODY></TABLE></FORM><p>&amp;nbsp;</p>
<p align=\&quot;center\&quot;><font face=\&quot;Tahoma\&quot; size=\&quot;2\&quot; color=#ffffff>R&amp;eacute;sultats collect&amp;eacute;s
par Drone38&amp;reg;</font></p>
</BODY></HTML>&quot;
}
begin
fichier < site
exit 0

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top