From: bostonmacosx Date: 2006-05-02T05:53:13+09:00 Subject: Re: So I got a binary file... mydata = String.new f = File.open("WesObs_Sumatra_032805.sac","rb") #while line = f.gets #mydata << line #end newstring = f.read #puts newstring newdata = newstring.unpack('f*') #puts newdata fw = File.open("test.txt","wb") fw.write(newdata) Ok here is what I have. It works however I need to do two things. the Correct Data: 0.1646618 -194.0000000 194.0000000 -12345.0000000 -12345.0000000 0.0000000 11823.0429688 0.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 42.3849983 -71.3219986 60.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 1.5362868 0.0000000 0.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 -12345.0000000 2005 87 16 17 36 963 6 -12345 -12345 71803 -12345 -12345 -12345 -12345 -12345 1 7 10 -12345 -12345 -12345 -12345 5 45 -12345 -12345 -12345 -12345 -12345 -12345 -12345 -12345 -12345 -12345 -12345 1 0 1 4294954951 4294954951 WesObs -- Posted via http://www.ruby-forum.com/.