[user@mymachine folder]$ echo `date --date=tomorrow +%Y%m%d`20160802[user@mymachine folder]$ echo `date -d=tomorrow +%Y%m%d`date: invalid date `=tomorrow'I'm using Centos 5 if that makes any difference.
Why is one of these date commands valid and the other not?
options;date utility
The short options or unix style options are usually separated from its argument using a space, but space is not strictly required in some casesFor instance echo `date -dtomorrow +%Y%m%d`andecho `date -d tomorrow +%Y%m%d`would work just fineHowever in case of,echo date -d=tomorrow +%Y%m%d=tomorrow is considered the argument to d but it doesn't make a valid date string