Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I found out that date --date 'Jul 16 1991' has an complete output, but I only want the terminal to show the name of the day e.g. Monday. How do I do that?

share|improve this question

1 Answer 1

up vote 7 down vote accepted
date --date 'Jul 16 1991' +%A

See man date, specifically the section on output formatting.

share|improve this answer
1  
Ah I see, I did tried date --date %A 'Jul 16 1991' but did not work, I get the order now. Thank you –  F4LLCON Nov 17 '12 at 23:30
1  
@F4LLCON Also note that the + is important. –  Michael Kjörling Nov 19 '12 at 10:26
    
yes thank you i saw that :) –  F4LLCON Nov 19 '12 at 15:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.