how to read the contents of a file in bash for loop code example Example: bash iterate over lines of a file while read p; do echo "$p" done <peptides.txt