Running on MacOS. Learning bash so bear with me. I have a simple bash script that looks like this:
#!/bin/bash
RUN_DATE=`date +%Y_%m_%d`
python3 /path/to/some/builder.py --date=$RUN_DATE
Where I have a program called builder.py and it takes an date input. I want to write a bash script that sets $RUN_DATE to whatever the date it is at the time of the run. It will be read in Python as a string input. However, I get the following error:
RUN_DATE=`date +%Y_%m_%d`
^
SyntaxError: invalid syntax
Is there something obvious I'm overlooking to get this to work?