Bret Joseph
Bret Joseph

Reputation: 519

How can I output the date of the last "day"?

I want to print the day of the last Monday for example using the date command in a terminal Provided I do not know what day/ date is today but I can use date to find out the date and then use it to find out what date the first previous monday was.

Upvotes: 0

Views: 52

Answers (1)

Ipor Sircer
Ipor Sircer

Reputation: 3141

If you are using gnu date, you can try the following command:

date -d "last monday"

Upvotes: 2

Related Questions