Speed Scripting Shootout

From Computer Science Community

Jump to: navigation, search

[edit] Round 1

  • Winner: Team HHDDVVDDBVD (Darren, Brian, Esther)
    Final submission: find /usr/bin -size +10k > outfile (Darren)
    Alternate solution (Mac OS X): mdfind -onlyin /usr/bin 'kMDItemFSSize > 10240' > ~/md_outfile (Brian)

[edit] Round 2

  • Winner: Cory

[edit] Round 3

  • Winner: Team HHDDVVDDBVD (Brian, Darren, Esther)
    #!/bin/bash
    for line in $(cat /usr/share/dict/words | grep ^S); do
    echo -n "$line -- "
    echo $line | openssl sha1
    done
  • Runner up: Dave
    #!usr/bin/ruby
    require 'digest/sha1'
    IO.foreach('/usr/share/dict/words') {|x| print "#{x.chomp} -- #{Digest::SHA1.hexdigest(x)}\n" unless (x.index('s')!=0 && x.index('S')!=0) }
Personal tools
services