#!/bin/bash # Set the maximum number of iterations max=5000 # Clear the screen clear # Iterate over each item for i in $(seq 0 $max) do # Calculate the percentage percent=$((i * 100 / max)) # Calculate the number of characters to fill in the progress bar bar=$((i * 20 / max)) # Clear the current line and print the progress bar printf "\r[%-${bar}s] %d%%" "$(printf '%*s' "$bar" | tr ' ' '=')" "$percent" # Do the work out="${i}: $(curl -s "https://directory.web.actf.co/${i}.html")" echo $out >> result.txt done # Print a newline character after the loop is done echo ""