UNLOCK_ACCOUNTS="" UNLOCK_ARGS="" if [ -n "$UNLOCK_START_INDEX" ]; then INDEX=0 END_INDEX=$(($UNLOCK_START_INDEX + $UNLOCK_NUMBER)) while read p; do if [ "$INDEX" -ge "$UNLOCK_START_INDEX" ]; then if [ "$INDEX" -lt "$END_INDEX" ]; then cat passwordsource >> passwordfile UNLOCK_ACCOUNTS=$(echo $UNLOCK_ACCOUNTS$(echo $p | cut -d ',' -f 1), ) fi fi INDEX=$(($INDEX + 1)) done