I am writing a bash script and I need the date of the Monday of the current week.
date -d monday
returns the correct date if it is Monday. And
date -d last-monday
returns the correct date at Tuesday until Sunday.
I can use an if-clause in the script but I am interested if there is an oneliner too?