[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.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The short options or unix style options are usually separated from its argument using a space, but space is not strictly required in some cases
echo `date -dtomorrow +%Y%m%d`
echo `date -d tomorrow +%Y%m%d`
would work just fine
However in case of,
date -d=tomorrow +%Y%m%d
=tomorrow is considered the argument to
d but it doesn't make a valid date string