I call a python script with some command line arguments like:
python3 script.py --run 1 --filepath "this/file/dir"
I now try to parse the arguments from a config file with:
grep -v '^#' ${THIS_FILE_DIR}/model.conf | sed 's/=/ /' | xargs -I% echo "--%"
This yields my desired string:
--run 1
--filepath this/file/dir
Is there a way to input this string dynamically into my python command, something along the lines of:
python3 script.py $(grep -v '^#' ${THIS_FILE_DIR}/model.conf | sed 's/=/ /' | xargs -I% echo "--%")
Conf File for references
# vars
run=1
filepath=this/file/dir