#!/bin/sh
database=defult
hive -e "use ${database}; show tables;" |grep order_ |while read line
do
echo -n "drop table ${line};" >> droptables.txt
done
tables=`cat droptables.txt`
echo ${tables}
hive -e "use ${database}; ${tables}"
#rm droptables.txt
hive批量删除表 shell脚本
最新推荐文章于 2023-12-02 20:06:28 发布