#!/bin/bash
HADOOP=$(which hadoop)
$HADOOP fs -test -e $1
if [ $? -eq 1 ]
then
$HADOOP fs -put $1 /
if [ $? -eq 0 ]
then
echo "the file $1 put successfully!"
fi
fi
转载于:https://www.cnblogs.com/pingzizhuanshu/p/8995455.html
#!/bin/bash
HADOOP=$(which hadoop)
$HADOOP fs -test -e $1
if [ $? -eq 1 ]
then
$HADOOP fs -put $1 /
if [ $? -eq 0 ]
then
echo "the file $1 put successfully!"
fi
fi
转载于:https://www.cnblogs.com/pingzizhuanshu/p/8995455.html