标签:return and use bin size nbsp for load eva
#!/bin/bash apiName=bz_return_order api_csv_path_home=/home/vmuser/linbo/test_upload/data_file evnArr=(prod test) declare -A prodFileAndSizeMap declare -A testFileAndSizeMap dtformat=`date -d "1 day ago" +"%Y-%m-%d"` cd $api_csv_path_home apiNames=(`ls`) for apiName in ${apiNames[*]} do for ((i=0;i<${#evnArr[*]};i++)); do cd $api_csv_path_home/$apiName/${evnArr[i]} cmmd="ls --full-time ./ | sed -n ‘/${dtformat}/p‘ | awk ‘{print \$9\" \"\$5\"B\" }‘" if [[ ${evnArr[i]} == "prod" ]]; then prod_fileArr=(`eval $cmmd`) length=`expr ${#prod_fileArr[*]} / 2` prodFileAndSizeMap["${apiName}.${evnArr[i]}.[${length}]"]="${prod_fileArr[*]}" echo "---------------prod----------------" echo "${!prodFileAndSizeMap[*]} : ${prodFileAndSizeMap[*]} " else test_fileArr=(`eval $cmmd`) length=`expr ${#test_fileArr[*]} / 2` testFileAndSizeMap["${apiName}.${evnArr[i]}.[${length}]"]="${test_fileArr[*]}" echo "---------------uat----------------" echo "${!testFileAndSizeMap[*]} : ${testFileAndSizeMap[*]} " fi done done
标签:return and use bin size nbsp for load eva
原文地址:https://www.cnblogs.com/linbo3168/p/14201256.html