On Aug 5, 2005, at 12:34 PM, Peter C. Verhage wrote:

> Possible "spoiler", but Yahoo makes it easy to get the stock data,  
> see:
> http://www.gummy-stuff.org/Yahoo-data.htm

Thanks for sharing.  I wasn't aware of that service and it is trivial  
to wrap:

$ ./stock_data -s -n -d1 -l1 -y -r AAPL GOOG PIXR RHAT
"AAPL","APPLE COMPUTER","8/9/2005",43.55,N/A,35.54
"GOOG","GOOGLE","8/9/2005",289.969,N/A,85.34
"PIXR","PIXAR","8/9/2005",43.65,N/A,26.73
"RHAT","RED HAT INC","8/9/2005",14.24,N/A,57.87
$ cat stock_data
#!/usr/local/bin/ruby -w

# Stock data via:  http://www.gummy-stuff.org/Yahoo-data.htm

require "open-uri"

# parse options and symbols requested
data, stocks = ARGV.partition { |e| e[0] == ?- }
data         = data.map { |tag| tag[/\w+/] }.join
stocks       = stocks.join("+")

# fetch and print data
open "http://finance.yahoo.com/d/quotes.csv?s=#{stocks}&f=#{data}" do  
|csv|
         csv.each { |line| puts line }
end

__END__

James Edward Gray II