Computing.Net > Forums > Unix > get weekday from date

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

get weekday from date

Reply to Message Icon

Name: gjoob
Date: November 17, 2003 at 08:24:35 Pacific
OS: Compaq Tru64
CPU/Ram: f
Comment:

I'm trying to rename a file from gjoob.txt to gjoob_monday.txt depending on the day of the week.
I can get the current day of the month by typing `date '+%d'` but is there anyway to calculate the weekday from the date?

All help greatly appreciated

Joobs



Sponsored Link
Ads by Google

Response Number 1
Name: Jake
Date: November 17, 2003 at 09:18:28 Pacific
Reply:
0

Response Number 2
Name: Nails
Date: November 17, 2003 at 10:55:17 Pacific
Reply:

check out this:

http://computing.net/unix/wwwboard/forum/5035.html


0

Response Number 3
Name: suraj31
Date: November 17, 2003 at 11:12:04 Pacific
Reply:

CUR_DAY=`date '+%a'`


0

Response Number 4
Name: gjoob
Date: November 18, 2003 at 02:26:00 Pacific
Reply:

Thanks a lot, that =`date '+%a'` worked a treat.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: get weekday from date

Get Tomorrow's Date in ddmmyy www.computing.net/answers/unix/get-tomorrows-date-in-ddmmyy-/5648.html

Getting old date into variable www.computing.net/answers/unix/getting-old-date-into-variable/5223.html

A week back date www.computing.net/answers/unix/a-week-back-date/7362.html