2020/23 bash: unify the 2 parts code

This commit is contained in:
2022-10-20 08:51:10 +02:00
parent 30cdb5e1a4
commit f6d1fe7b9d
2 changed files with 3 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ next[$_cup]=$cup # close the ring
_cup=$cup
declare -i _1st _2nd _3rd dest
# make the moves: a simple sub linked list operation.
for ((i = 1; i <= runs; ++i)); do
_1st="${next[$cup]}"
_2nd="${next[$_1st]}"