脚本放置*.db同目录下,执行即可
dbfile=`find -name "*.db"`
chmod 777 *
echo $dbfile
for f in $dbfile
do
echo "========="
echo $f
tables=`sqlite3 $f ".tables"`
for j in $tables
do
echo "====查表内容写入开始======="
sqlite3 $f "select * from $j" >> result
"=============" >>result
done
done