Get the date (a day before current time) in Bash

后端 未结 17 2156
臣服心动
臣服心动 2020-11-30 17:54

How can I print the date which is a day before current time in Bash?

17条回答
  •  情书的邮戳
    2020-11-30 18:22

    Well this is a late answer,but this seems to work!!

         YESTERDAY=`TZ=GMT+24 date +%d-%m-%Y`;
         echo $YESTERDAY;
    

提交回复
热议问题