bash execute command for each line in a file code example
Example 1: bash for each line of file
while read p; do
echo "$p"
done <peptides.txt
Example 2: how to perform an action for each line in bash
while read line
do
echo $line
// or some_function "$line"
done < testfile.txt