转自:https://blog.csdn.net/t___z/article/details/78492113
#!/bin/bash hive -e "use lbi;show tables;" > hivetables.txt sleep(2) cat hivetables.txt |while read eachline do hive -e "show create table $eachline;" >>hivetablesDDL.txt done
原文:https://www.cnblogs.com/wangbin2188/p/9355524.html