The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-26-2009
cambridge cambridge is offline
Registered User
  
 

Join Date: May 2009
Posts: 55
This following should be quicker...


Code:
gawk '
   BEGIN {
     for (i=-3;i<=3;i++)
     {
        cmd="date --date=\"" i "days\" \"+%b%d\""
        cmd | getline
        close(cmd)
        dy[$0]++
     }
   }
   { for (s in dy) if ($0 ~ "^" s "[^0-9]") print }' les