#!/bin/bash
### create time :20080804
### author :huangxifeng
### description :1.查找所有html,htm,shtml文件类型的文件,保存至file.txt
### 2.把文件的内容全部改为小写
find /var/www/html -name *.htm >> file.txt
find /var/www/html -name *.html >> file.txt
find /var/www/html -name *.shtml >> file.txt
for i in `cat file.txt`
do
sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' $i > $i.lower;
rm -f $i;
mv $i.lower $i;
done
阅读(1408) | 评论(1) | 转发(1) |