From: Arlen Cuss Date: 2008-03-14T07:55:46+09:00 Subject: Re: script runs ok alone, broken pipe when piped to head? ------=_Part_21993_5055435.1205448937425 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, On Fri, Mar 14, 2008 at 9:34 AM, Dave Burns wrote: > Row: 1 Cell: 1> 1173 > Row: 1 Cell: 2> 961SU > Row: 2 Cell: 0> 80118 > excelparse.rb:19:in `write': Broken pipe (Errno::EPIPE) > from excelparse.rb:19:in `puts' > from excelparse.rb:19 > from excelparse.rb:15:in `each' > from excelparse.rb:15 > from /usr/lib/ruby/gems/1.8/gems/parseexcel-0.5.2 > /lib/parseexcel/worksheet.rb:143:in > `each' > from /usr/lib/ruby/gems/1.8/gems/parseexcel-0.5.2 > /lib/parseexcel/worksheet.rb:143:in > `each' > from excelparse.rb:11 > > Any hints? The script itself is a minor mod of the example given at > the parseexcel site (see below). It's a very random guess, but is the EPIPE possibly happening because `head' closed the connection after reading 10 lines? What happens if you run it like this..? ruby -rubygems excelparse.rb stuff.xls 2>&1 | less Arlen ------=_Part_21993_5055435.1205448937425--