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
Post a Comment