(1) 将HDFS中指定文件的内容输出到终端中
hadoop fs -ls / # show files
read -p "Please input file you want to output: " fileName # input
if hadoop fs -test -e /$fileName # test if this file exist
then
hadoop fs -cat /$fileName # output file
else
echo "The file doesn't exist, output failed." # output error msg
fi



