Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    # word counting program
    ...
    foreach my $word (sort { $count{$a} <=> $count{$b} or $a cmp $b } keys
    + %count) {
        print "$count{$word} $word\n";
    }
    
  2. or download this
    #!/bin/bash
    # input a file name like this:
    ...
    sed "s/\bhere\b//gi" | 
    sed '/^$/d' | 
    sort | uniq -c | sort -nr | less