done < /usr/local/src/shellcode/users
cat >>/usr/local/src/shellcode/report.html <<here
</table>
here
}
report()
{
i=0
cat>/usr/local/src/shellcode/report.html<<eof
<table>
<tr>
<th>序号</th>
<th>时间</th>
<th>用户</th>
<th>登陆次数</th>
<th>登陆时间</th>
<th>登陆地址</th>
</tr>"
eof
for (( ;i<$df; i++ ))
do
echo $i
echo ${ur[$i]}
cat >>/usr/local/src/shellcode/report.html<<eof
<tr>
<td>$i</td>
<td>2013-11-27</td>
<td>${ur[$i]}</td>
<td>${ci[$i]}</td>
<td>${ti[$i]}</td>
<td>${ip[$i]}</td>
</tr>
eof
done
cat >>/usr/local/src/shellcode/report.html <<here
</table>
here
}
getUsermessage
getusername
sed -i "s/+/;/g" /usr/local/src/shellcode/report.html