怎样看懂html里的shell脚本,我修改网页样式,需要看shell程序

html-css09

怎样看懂html里的shell脚本,我修改网页样式,需要看shell程序,第1张

config_get 是读取配置文件的

eval FORM_dns2="\$FORM_${interface}_dns2" 是读取页面表单的值的,${interface}_dns2这个应该是你页面的上表单的class吧

if empty "$FORM_submit"then 这个意思是你页面点击了提交按钮就读取表单的值,否则读取配置文件保存的值

你这是在做网关的嵌入式页面??

用 wget 获取一下 bbs.chinaunix.net 的页面,得到的页面是bbs.chinaunix.net版面列表,然后自然是要分析这个 html 文件,但是 html 文件的“源码”跟普通 txt 文件差别很大,在html“源码”里多几个空行,多几个空格都不会影响 html 文件的显示,但对于格式分析却有很大影响!

这个实在太简单,哥给你写好。

#!/bin/bash

echo "" >index.html

echo "<html><head><title>My HTML Image Viewer</title></head><body>" >>index.html

for f in `ls *.jpg`do

echo "<img src=\"$f\"/>" >>index.html

done

for f in `ls *.bmp`do

echo "<img src=\"$f\"/>" >>index.html

done

for f in `ls *.gif`do

echo "<img src=\"$f\"/>" >>index.html

done

echo "</body></html>" >>index.html

记得给哥加分