Zsh command substitution

Posted by Dr. Watson on Stack Overflow See other posts from Stack Overflow or by Dr. Watson
Published on 2010-05-21T14:21:36Z Indexed on 2010/05/21 14:40 UTC
Read the original article Hit count: 241

Filed under:

I usually work with BASH, but I'm trying to setup a cronjob from a machine and user account that is configured with zsh. When the cronjob runs, the date variable does not contain the date, just the string for the command to return the date.

DATE=$(date +%Y%m%d)
55 15 *  *  1-5  scp user@host:/path/to/some/file/$DATE.log /tmp

I've tried using backticks rather than $() around the command, but that did not work either. Is there a special way to do command substitution in zsh?

© Stack Overflow or respective owner

Related posts about zsh