Perl to shell convert

HI All, I am new in shell scripting ,can any one please help me to convert this scripts from Perl to Shell.
Thank in advance.

$customer=$ARGV[0];
$rows=`hadoop fs -ls /ncip/$customer/|wc -l`;
if($rows==3){
print "$customer directory exists , cleaning up ! \n";
`hadoop fs -rm /ncip/$customer/in-csv/*.csv/`;
`hadoop fs -rm /ncip/$customer/out-csv/*.csv/`;
}else{
print "Creating $customer folder \n";
`hadoop fs -mkdir /ncip/$customer/`;
`hadoop fs -mkdir /ncip/$customer/in-csv/`;
`hadoop fs -mkdir /ncip/$customer/out-csv/`;
}

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.