How can I get yesterday’s date in bash?

How can I get yesterday’s date in bash?
Answer
Bash solely on bash, you can also get yesterday’s time, via the printf builtin: %(datefmt)T causes printf to output the date-time string resulting from using datefmt as a format string for strftime(3). The corresponding argu‐ ment is an integer representing the number of seconds since the epoch.
 

Tìm kiếm

Back
Top