Question:

How can you display today's date in a shell script in the form YYYYMMDD? Thanks!?

by  |  earlier

0 LIKES UnLike

How can you display today's date in a shell script in the form YYYYMMDD? Thanks!?

 Tags:

   Report

3 ANSWERS


  1. man date just wants to date you..


  2. date +%Y%m%d

    Note the capital "Y", and lower-case "m" and "d".

    - kb -

  3. man date will show you the formatting options, you are looking for %Y (full year 4 digit) %m (number of month) and (%d) day of the month.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions