Qu3ry Qu3ry wrote: > Suppose I have the following files to group and merge, according to > their filenames. How to do it on Ruby? > > > P.S In BASH, you can merge two mp3 files perfectly with the cat command. > # cat file1.mp3 file2.mp3 > file.mp3 > > 01-01 Faithful Subjects.mp3 > 01-02 Faithful Subjects.mp3 > 01-03 Faithful Subjects.mp3 > 01-04 Faithful Subjects.mp3 > 01-05 Faithful Subjects.mp3 > 01-06 Faithful Subjects.mp3 > 01-07 Colonial Constitutions and Their Inspiration.mp3 > 01-08 Colonial Constitutions and Their Inspiration.mp3 > 01-09 Colonial Constitutions and Their Inspiration.mp3 > 01-10 Colonial Constitutions and Their Inspiration.mp3 > 01-11 Colonial Constitutions and Their Inspiration.mp3 > 01-12 Colonial Constitutions and Their Inspiration.mp3 > 02-01 blah blah blah.mp3 > 02-02 blah blah blah.mp3 > etc... Open first file for write and binary, then put the cursor at the end of the file.. Then open the second file, for read and binary, and then add it to the end, and so on? -- Posted via http://www.ruby-forum.com/.