方法一 先删除表 batch-delete-tables.sh #!/bin/sh dbname=$1 hive -e "use $dbname;show tables;"| while read line do echo -n "drop table $line purge;">>temptables.txt done tables=`<