一 BB
个人找了好多快速检索linux文件的办法,最后还是grep更胜一筹.
二 脚本
#!/bin/bash
if [ $# -ne 3 ]
then
echo "usage:$0 [full_path] <table> [output_file]"
exit 1
fi
# t_name 表名
# b_file 备份名
# r_fule 还原到文件
t_name=$1
b_file=$2
r_file=$3
time grep "INSERT INTO \`$1\` VALUES" $2 > $3