A script takes a URL, parses it for the required fields, and redirects its output to be saved in a file, file.txt. The output is saved on a new line each time a fie
You can simply read each line from the file and assign it to an array.
#!/bin/bash i=0 while read line do arr[$i]="$line" i=$((i+1)) done < file.txt