I want to do the following, read line by line of a file and use the value per line as params
FILE=\"cat test\" echo \"$FILE\" | \\ while read CMD; do echo $C
If you want to use each of the lines of the file as command-line params for your application you can use the xargs command.
xargs -a
A params file with:
a b c d
and the file tr.py:
import sys print sys.argv
The execution of
xargs -a params ./tr.py
gives the result:
['./tr.py', 'a', 'b', 'c', 'd']