I am trying to loop inside a text file containing commands to be executed:
while IFS= read -r line
do
$line
done < msmtp-cmds.txt
The commands inside the text file are:
msmtp -t < message1.txt
msmtp -t < message2.txt
After command substitutions the redirection sign seems to be ignored, as msmtp is trying to use message1.txt as a recipient, but I cannot figure why