点击查看代码
AutoHelpOther=true
UserSum=20
TempBlockCookie=2
MyFruit1="1111"
MyFruit2="222"

function Combin_Sub() {
  CombinAll=""
  if [[ ${AutoHelpOther} == true ]] && [[ $1 == ForOther* ]]; then

    ForOtherAll=""
    MyName=$(echo $1 | perl -pe "s|ForOther|My|")

    for ((m = 1; m <= ${UserSum}; m++)); do
      TmpA=${MyName}$m
      TmpB=${!TmpA}
        echo $TmpA A $m
        echo $TmpB B $m
            ForOtherAll="${ForOtherAll}@${TmpB}"

    done
 #   echo $ForOtherAll
    for ((n = 1; n <= ${UserSum}; n++)); do
      for num in ${TempBlockCookie}; do
        [[ $n -eq $num ]] && continue 2
      done
      CombinAll="${CombinAll}&${ForOtherAll}"
    done
 #   echo $CombinAll
fi
}
Combin_Sub ForOtherFruit

posted on 2021-10-31 20:04  vmsky  阅读(34)  评论(0编辑  收藏  举报