Bash read txt file into array

declare -a DIRS
readarray -t DIRS < /var/www/html/.logPaths.txt

let i=0
while (( ${#DIRS[@]} > i )); do
    #Do Your Stuff
done

You may also like...