How to convert date to lower case within a bash script without declaring variable?

71 Views Asked by At

I am trying to convert the date to all lower case in a bash script command. However, I am trying not to first declare a variable and then converting.

I tried

rclone sync /home/homeassistant GoogleDrive:/homeassistant_$(date +%A)|tr '[:upper:]' '[:lower:]' -vv --exclude=/config/secrets.yaml --exclude=/config/home-assistant_v2.db --delete-excluded

but that leads to the excludes to be ignored (essentially everything after to conversion is cut off). Does anybody know a simple fix for this? Unfortunately the date only supports conversion to upper case using ^ but not to lower case.

Thanks Alex

0

There are 0 best solutions below