How do I get a complete list of all table names in all databases in Hive?

Shell
# one-liner trick to get list of hive database from commandline
for i in `hive -e 'show databases;'`; do echo $i; hive --database=$i -e 'show tables;' | tee -a output.txt; done
Source

Also in Shell: