From: Jonan Scheffler Date: 2012-11-05T10:56:50+09:00 Subject: Re: one-liner program example --20cf3074d8a44ed62404cdb5cc9d Content-Type: text/plain; charset=ISO-8859-1 Dir.glob("*.csv").each { |f| `eliminate_duplication.rb #{f}` } On Nov 4, 2012 5:52 PM, "Soichi Ishida" wrote: > Ruby 1.9.3 > > I want to practice one-liner programs which are the programs written and > executed in command lines interactively. > I have no experience in Perl, so I need to do this with Ruby (or > shell-script). > > Say, I have a Ruby script > > eliminate_duplication.rb > > which takes one file input like > > eliminate_duplication.rb file_A.csv > > Also I have the whole set of files named > > file_A.csv file_B.csv file_C.csv ...(up to Z) > > Could anyone show me examples of one-liner program which apply the > script "eliminate_duplication.rb" to every file in that directory? > > Thanks > > soichi > > -- > Posted via http://www.ruby-forum.com/. > > --20cf3074d8a44ed62404cdb5cc9d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Dir.glob("*.csv").each { |f| `eliminate_duplicatio= n.rb #{f}` }

On Nov 4, 2012 5:52 PM, "Soichi Ishida"= ; <lists@ruby-forum.com> = wrote:
Ruby 1.9.3

I want to practice one-liner programs which are the programs written and executed in command lines interactively.
I have no experience in Perl, so I need to do this with Ruby (or
shell-script).

Say, I have a Ruby script

=A0 eliminate_duplication.rb

which takes one file input like

=A0 eliminate_duplication.rb file_A.csv

Also I have the whole set of files named

=A0 file_A.csv file_B.csv file_C.csv ...(up to Z)

Could anyone show me examples of one-liner program which apply the
script "eliminate_duplication.rb" to every file in that directory= ?

Thanks

soichi

--
Posted via http://= www.ruby-forum.com/.

--20cf3074d8a44ed62404cdb5cc9d--