path=`pwd` files=$(ls $path) for filename in $files do filename=${filename%.*} $HIVE_HOME/bin/hive -e "load data local inpath '$path' overwrite into table bigtrouble.accountregister partition ( create_date='$filename');" done
坑 -e不进入hive的交互窗口执行sql语句,sql语句要被双引号引起来