#!/bin/bash
file=$(find /1 -name "*.shtml")
old=$(grep -o "" $file)
new=$(echo $old|awk -F/ '{ print " 's#\?#\\?#g'|sed 's#\\\g')
echo $new
sed -i "s#$old#$new#g" $file
find /1 -name "*.shtml"|grep -o " read old
do
new=$(echo $old|awk -F/ '{ print " 's#\?#\\?#g'|sed 's#\\\g')
echo $new
sed -i "s#$old#$new#g" $file
done
find /1 -name "*.shtml"|xargs sed -ri 's#*sid/(.*)/v.swf#\?VideoIDS=\1\&isAutoPlay=true\&embedid=-\&showAD=0#g'
[root@linglingshang2009 /]# cat test
[root@linglingshang2009 /]# cat test |sed -r 's#\?union=(.*)\&token=(.*)\&typeid=(.*)\&type=(.*)#\1_\2_\3_\4.xml#g'
阅读(260) | 评论(0) | 转发(0) |