hive -e "use default;show tables; " > tables.txt
cat tables.txt|while read eachline
do
echo "drop table if exists default.$eachline;" >> Droptables.hql
done
hive -f Droptables.hql
hive -e "use default;show tables; " > tables.txt
cat tables.txt|while read eachline
do
echo "drop table if exists default.$eachline;" >> Droptables.hql
done
hive -f Droptables.hql