[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Re: Pan-users Digest, Vol 20, Issue 15

From: Jeff Vian
Subject: Re: [Pan-users] Re: Pan-users Digest, Vol 20, Issue 15
Date: Thu, 29 Jul 2004 08:43:20 -0500

On Thu, 2004-07-29 at 01:19, Brad Rogers wrote:
> On Wed, 28 Jul 2004 19:10:36 -0700
> Duncan <address@hidden> wrote:
> Hello Duncan,
> > 4) Note that /all/ parts need to have the same number of digits in the
> > extension for the above to get the order correct.  Thus
> > .001-.009,.010... will work, but .1-.9,.10-.99,.100-.999... will NOT
> > work, without renaming so the extensions line up.  The part ordering
> > of the latter would be out of order because cat will be combining in
> > alphabetical order.  An alternative to the renaming might be listing
> > the ranges as necessary, tho I've not tried it.
> It works, but you have to be careful about the input filename
> extensions (* is no good, obviously).

but in the example given it would be easy to make 3 parts and then add
those together.

cat *.? > test1.mpg
cat *.?? > test2.mpg
cat *.??? > test3.mpg

and finally 
cat test?.mpg > test.mpg

should put them all together in sequence with test.mpg as the result.

An alternative method and one I have used is to write a counter loop
that uses a variable numeric counter to just walk the line from 1 to the
last part and cat that piece to the end of the previous part with cat
filename.### >> outputfile where ### is the string representation of the
number then being used. and incrementing it each time through the loop.

the latter method will ensure they are in sequence and does not depend
on the shell ordering to put it right.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]