hive上批量删除表
#!/bin/sh
hive -e "use china_prod;show tables \"t_tag_political*\";" | while read line
do
echo "drop table $line;">>temptables.txt
done
hive -e "use china_prod;show tables \"tag*\";" | while read line
do
echo "drop table $line;">>temptables.txt
done
tables=`cat temptables.txt`
echo $tables
hive -e "use china_prod;$tables"
rm temptables.txt