黑猴子的家:hive-batch-create-table.sh

#! /usr/bin/env bash
HIVE_HOME=/opt/module/hive-1.2.1
ls ${HIVE_HOME}/hive-table/*.sql > ${HIVE_HOME}/hive-table.txt
cat ${HIVE_HOME}/hive-table.txt | while read eachline
do
    echo "hive -f ${eachline}"
    ${HIVE_HOME}/bin/hive -f "${eachline}"
done

你可能感兴趣的:(黑猴子的家:hive-batch-create-table.sh)