bash loop file code example
Example 1: bash loop over files in directory
#!/bin/bash
for filename in /Data/*.txt; do
...
done
Example 2: bash iterate over lines of a file
while read p; do
echo "$p"
done <peptides.txt
#!/bin/bash
for filename in /Data/*.txt; do
...
done
while read p; do
echo "$p"
done <peptides.txt