#!/bin/bash
#在test.html中插入
aaaaa
installsir="11111"
FILE_NAME="test.html"
TB_START="
"
TB_STR=
exec 3<> $FILE_NAME
while read LINE <&3
do
if [ "$LINE" == "$TB_END" ]
then
TB_STR=`echo $LINE`
fi
done
exec 3>&-
if [ "$TB_STR" == "$TB_END" ]
then
echo "go"
sed -i '/<\/table>/d' $FILE_NAME
echo "
"$installsir"
">>$FILE_NAME
echo "$TB_END">>$FILE_NAME
fi
#test.html
#
阅读(1369) | 评论(0) | 转发(0) |