nextcloudpi/generate_cohortes.sh
Tobias Knöppler 61ba6a63fa
system_tests.py: Add auto update test
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-10-26 14:30:17 +02:00

17 lines
304 B
Bash
Executable File

#!/usr/bin/env bash
#min=$((101-${1:-50}))
all=({100..1})
cohortes=()
for i in "${all[@]:0:${1?}}"
do
cohorte_id=$((RANDOM % i))
while [[ " ${cohortes[*]} " =~ .*" ${cohorte_id} ".* ]]
do
cohorte_id=$((cohorte_id+1))
done
cohortes+=($cohorte_id)
done
echo "${cohortes[*]}" | tr ' ' $'\n'