Passing UNIX-based parameter to a task

Garrus990
New Contributor II

Hey,

I would like to pass to a task a parameter that is based on a UNIX function. Concretely, I would like to specify dates - dynamically calculated with respect to the date of running my job. I wanted to it like that:

["--period-start", "$(date -d '-7 days' +'%Y-%m-%d')", "--period-end", "$(date -d '-1 days' +'%Y-%m-%d')"]

It doesn't seem to work, though. Is there any way of achieving it?