How to pass each line of a text file as an argument to a command?

I'm looking to write a script that takes a .txt filename as an argument, reads the file line by line, and passes each line to a command. For example, it runs command --option "LINE 1", then command --option "LINE 2", etc. I am fetching object files from a library file, I have all the object file names saved in .txt file.
How do I go about doing that? Just a Single Line of Command with different filenames from text file.

I don't know where to start.
I am using MAC terminal.

Thanks in advance.
Paul

bash is on Mac.

while read rec
do
command --option "$rec"
done < inputfile > outputfile

Try that...

Assumes a Unix/Linux end of line... run dos2unix on the text file or mac2unix where appropriate.

tr '\012' '\000' <filename.txt | xargs -0 -i -n1 mycommand --option {}