View Single Post
  #2   (View Single Post)  
Old 31st August 2009
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

Code:
cal aug 2009 | perl -nae '$w=$weeknum=1; @d=split if $.==2;if($.==$w+2){for(0..6){if(defined($F[$_])){$_-=@F if $w==1;print "$d[$_] "}};print "\n" if @F!=0}'
Set the variable $weeknum (1-6) as required.
Reply With Quote