From: Wilson Bilkovich Date: 2006-04-27T10:27:18+09:00 Subject: Re: Ruby for command line applications On 4/26/06, Alan Moeen wrote: > > What I need to do with Ruby is text file processing, file manipulations, > and query oracle database. Is there any tutorial for command line > application developers? Is it easy to query Oracle 10g with Ruby? > Very nice OCI8 library for Ruby here: http://www.jiubao.org/ruby-oci8/ Traditional lame code sample: #/usr/bin/env ruby require 'oci8' connection = OCI8.new 'username', 'password', 'someSID' count = connection.exec("select col1, col2, col3 from some_table") do |row| # row is an array containing the value of col1, col2, and col3 puts row.join(',') end puts "Printed #{count} rows in all."