Forgot to actually remove the bashism... and forgot a semicolon

    paste ranks.txt position.txt | while read -r x; do
      printf '%s %s %sn' "$x" "$(shuf -n 1 first.txt)" "$(shuf -n 1 last.txt)"
    done