Looping through the content of a file in Bash
One way to do it is: while read p; do echo “$p” done <peptides.txt As pointed out in the comments, this has the side effects of trimming leading whitespace, interpreting backslash sequences, and skipping the last line if it’s missing a terminating linefeed. If these are concerns, you can do: while IFS=”” read -r p … Read more