bash while ifs code example
Example 1: read file using shell script
#!/bin/bash
input="/path/to/txt/file"
while IFS= read -r line
do
echo "$line"
done < "$input"
Example 2: bash for each line of file
while read p; do
echo "$p"
done <peptides.txt
Example 3: bash loop with if
-eq # equal
-ne # not equal
-lt # less than
-le # less than or equal
-gt # greater than
-ge # greater than or equal