List only column names in table:
show columns from <tableName>;
List partitions:
show partitions <tableName>;
show columns from <tableName>;
List partitions:
show partitions <tableName>;
A good reference for Shell scripting https://linuxcommand.org/lc3_writing_shell_scripts.php