Computing.Net > Forums > Unix > Trouble with getting all Mondays

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Trouble with getting all Mondays

Reply to Message Icon

Name: sting013
Date: July 8, 2003 at 07:58:56 Pacific
OS: soliars
CPU/Ram: ?
Comment:

I have been trying to figurer out how to get all the Mondays for one year. I was thinking I would need the date command but can't figurer it out.
Thanks you.



Sponsored Link
Ads by Google

Response Number 1
Name: LANkrypt0
Date: July 8, 2003 at 08:24:03 Pacific
Reply:

Not sure what exactly you are asking for. What do you mean by "get all the Mondays for one year" ? Please clarify.

Thanks


0

Response Number 2
Name: sting013
Date: July 8, 2003 at 08:42:31 Pacific
Reply:

Sorry for not being clear. I would like to be able to run a script or command that would give me all the dates for Mondays in one year. Example I would run a script or command and get out put something like this.
Jul7
Jul14
Jul21
Jul28
Aug4
Aug11
Aug18
Aug25
etc..
Sorry again and thank you for looking at my post..


0

Response Number 3
Name: WilliamRobertson
Date: July 8, 2003 at 10:40:54 Pacific
Reply:

As a start,

cal 7 2003 | cut -c4-5 | grep '[0-9]'

gives the Mondays in July 2003. You could put that in a loop, substitute the current year with date +%Y etc.


0

Response Number 4
Name: sting013
Date: July 8, 2003 at 11:43:20 Pacific
Reply:

Thank you that will work great, Just what I need to get started. Thank you again


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Nfs mounting with rhl 9.0 Script to Remove lines fr...



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: Trouble with getting all Mondays

trouble with c-shell script & sed www.computing.net/answers/unix/trouble-with-cshell-script-amp-sed/4229.html

trouble with string != pattern www.computing.net/answers/unix/trouble-with-string-pattern/5375.html

Having troubles with PERL www.computing.net/answers/unix/having-troubles-with-perl/6743.html