bakfile="/home/zxin10/bakdata"
if [ -e $bakfile ];
then
rm -rf /home/zxin10/bakdata/*
else
mkdir $bakfile
chmod 777 $bakfile
fi
cat table.dat | while read line
do
echo "start to load table $line out..."
/home/zxin10/bin/xsql -s127.0.0.1 -p8433 -e "Load data outfile '$bakfile/$line.dat' from table $line field_term '|';"
echo "start to load table $line out end"
done
while read line
do
echo $line
done