Some cases the while read from file get "exhausted"
Then I map the the file to an array before using while loop
mapfile -t lines < "$file" for line in "${lines[@]}"; do printf "${line}" done