@Vj1989 Great way to simplify it. Believe you missed a 'use $f;' from Step 2 though, otherwise you're just getting the same tables over and over. E.g. for f in `cat /tmp/databases`
echo "Database name is $f , Table Names are as below:"
hive -e "use $f; show tables;" >> /tmp/tables
... View more