# Variables
TARBALL="battleship_boards.json.tar.gz"
SAMPLE_FILE="sampled_boards.json"
NUM_SAMPLES=1000  # Number of random samples to extract

# Stream the tarball and sample lines
tar -xzOf "$TARBALL" | shuf -n "$NUM_SAMPLES" > "$SAMPLE_FILE"

# Output the location of the sampled file
echo "Random samples saved to $SAMPLE_FILE"
