linux - Need to get the dates of all mondays in a year -


i need sort data on weekly base , have dates in logfile. therefore sort out data per week create list dates of mondays given year. have tried work out , idea have use ncal year , month argument looping on months , extracting mondays. isn't there more efficient way?

to mondays, getting dates , filtering mondays:

for in `seq 0 365`     date -d "+$i day" done | grep mon 

of course, take monday , keep incrementing 7 days.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -