How do I get the weekday from a date in the ubuntu terminal?
For example I type in: 1990-01-22
, I want to get an output that says for example Thursday if 22th day was a thursday
.
Use %A
:
$ date -d"1990-01-22" "+%A"
Monday
From man date
:
%A locale's full weekday name (e.g., Sunday)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With