You didn't say which shell you intend to use. This should work for bash or zsh (but I haven't tested it):
customer=${1:?Customer missing}
if [[ $(hadoop fs -ls /ncip/$customer/|wc -l) == 3 ]]
then
echo "$customer directory exists , cleaning up !"
hadoop fs -rm /ncip/$customer/in-csv/*.csv/ >/dev/null
hadoop fs -rm /ncip/$customer/out-csv/*.csv/ >/dev/null
else
echo "Creating $customer folder"
for d in / /in-csv/ /out-csv/
do
hadoop fs -mkdir /ncip/${customer}$d >/dev/null
done
fi
Don't forget to provide a suitable #! line!
BTW, this script may or may not work correctly, if the folders exist, but don't contain any CSV file. Depending on the intended behaviour in this case, some modifications of the script might be needed.