Help for this page

Select Code to Download


  1. or download this
    perl -ne 'chomp; $uniq{$_}++; END{print $_ . " => " . $uniq{$_} . "\n"
    + for keys %uniq}'
    
  2. or download this
    perl -lne '$uniq{$_}++; END{print $_ . " => " . $uniq{$_} for keys %un
    +iq}'
    
  3. or download this
    awk -vN=1 '{if($N in uniq){uniq[$N]++}else{uniq[$N]++}}END{for(k in un
    +iq){print k," => ",uniq[k]}}'
    
  4. or download this
    /* reads whole lines from stdin and counts how many times each
       was repeated, overall and NOT "adjacently"
    ...
            cout << itr->first << " => " << itr->second << endl;
        }
    }
    
  5. or download this
    Ncols=95
    Nthreads=4
    ...
      echo doing column $acol
      sem -j${Nthreads} sh tmpscript${acol}.sh
    done