#!/bin/bash#-------------------------------------------------------------# 把目录中的所有文件getmerge到本地# sh getmerge_batch.sh hdfs://hbase11:9000/sparkTsData/rapid7/out#-------------------------------------------------------------outdir=$1source ~/.bash_profilefiles=`hdfs dfs -ls $outdir | awk -F " " '{print $8}'`for name in $filesdo filename=`echo $name | awk -F '/' '{print $7}'` # this line================ #hdfs dfs -getmerge $name echo $filenamedone