March 2002 Perl Hardware Store 8

  1. Schwartzian Transform


    • Well-known to Unix shell programmers:

         # Sort file names by file size
         ls -l | sort -n +4 | awk '{print $NF}'
         # Sort output of SOMETHING from most frequent to least
         SOMETHING | uniq -c 
           | sort -nr | awk '{$1=""; print}'



Next Copyright © 2002 M-J. Dominus