I'm saving a list of files to a bash variable and I want to read that variable line by line.
The code for saving the file list to a variable is:
Code:
filelist_number="$((1 + "$(grep -n "FILE LIST:" /var/lib/pkgtools/packages/sc-7.16-x86_64-8 | cut -d : -f 1)"))"
filelist="$(sed -n "${filelist_number},\$p" /var/lib/pkgtools/packages/sc-7.16-x86_64-8)"
echo "${filelist}"
... and now I want to read "${filelist}" line by line. An example just doing "echo" of each line should be sufficient.