From: Robert Klemme Date: 2008-09-03T19:55:02+09:00 Subject: Re: Binary files comparision 2008/9/3 ruud grosmann : > something like: > > cksum1 = `cksum #{file1}` > cksum1.sub!( /(\d+)\s.*/, '\1') > cksum2 = `cksum #{file2}` > cksum2.sub!( /(\d+)\s.*/, '\1') > > cksum1 == chsum2 > > Or is this not what you're after? In that case why not directly use cmp? I thought the OP wanted a Ruby version. For small files this could be as easy as File.read(f1) == File.read(f2) Marcin, what kind of comparison do you need? Especially what output do you expect? Kind regards robert -- use.inject do |as, often| as.you_can - without end