Trouble understanding Bash and translating to Python
Trouble understanding Bash and translating to Python Question: I am trying to translate this from Bash to Python: export file="${directory}/scrutation_$(date "+%Y%m%d_%H%M%S").log" I know that export sets an environment variable, and that (date "+%Y%m%d_%H%M%S") is strftime("%d/%m/%Y, %H:%M:%S") in Python. This is what I have tried: import os os.environ[file]= f"{directory}/scrutation[strftime("%d/%m/%Y, %H:%M:%S")].log" Is this correct? Asked By: answer007 …