From: Ahmet Kilic Date: 2009-10-08T00:57:01+09:00 Subject: Re: lunix split with ruby unknown wrote: > On Wed, Oct 7, 2009 at 11:25 AM, Ahmet Kilic > wrote: >>>> please help me. >> I want to loop all files and split for each around 1mb. > Okay, that helps; looks like by default split names the files > "xaa".."xzz": > > http://unixhelp.ed.ac.uk/CGI/man-cgi?split > > As as first pass (still won't be quite what you asked for) try changing: > > "split -l 60000 #{file}" > > to: > > "split -l 60000 #{file} #{file}-" > > that should change the output file names from "x" + "#{counter}" to > "#{file}" + "-" + "#{counter}" thank you for quick reply. I cold not understand counter. Where is it coming? like this counter = 0 and counter file + 1 ??? -- Posted via http://www.ruby-forum.com/.