I have a Python script that I want to pass a bash variable to.
bash.sh
while read -r db
do
Printf "%s\n" ${db} "Found"
done < path/to/file.txt
output: db1 db2 db3
file.txt
db1
db2
db3
python.py
print(${db},+"_tables.replicate.fix")
I need an output of : db1 db2 db3
How can the python file know what the db variable holds in the bash file?
printf
line in Bash?sys.argv
?