i need to trasform my date in this format
DDMMYYYY
for example 26062017
and i need to know how can to trasform this date in yestarday
for example 25062017
.
Thanks a lot
What does transform mean?
I take it to mean:
date +'%d%m%Y'
does what you want. The % specifiers (there are a lot) allow you to create most of what you want. See your man page for date.
I am not sure about yesterday and what you want. Specific examples help a lot - like output you expect from sample input.
Yesterday:
date -d 'now - 1 day' +'%d%m%Y'
Chebarudo -
The date syntax you gave will work fine for GNU date (linux)
-- but not everywhere.
Since the question is not definite I gave the one thing that works on any compliant UNIX to produce today's date. It may well be not what is wanted.
Agree.