Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7554639
  • 博文数量: 1766
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16322
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1766)

文章存档

2024年(12)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2010-07-05 22:15:02

#!/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'

阅读(1499) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~