Jan Stary | 1 Oct 2010 21:01
Picon

Re: fixed width for the number in name

On Oct 01 18:15:55, Bertrand BENOIT wrote:
> Hi,
> 
> In man we can read :
>        In multiple output mode, a unique number will automatically be
> appended to the end of all filenames.  If the filename has an extension then
> the  number  is  inserted  before  the
>        extension.   This  behaviour  can  be customized by placing a %n
> anywhere in the filename where the number should be substituted.  An
> optional number can be placed after the % to
>        indicate a minimum fixed width for the number
> 
> But I doesn't works for me.
> I want 4 digits number, and so tried "recordedSpeech_%4n.wav" but it doesn't
> work.

As usual, you don't even mention the command you are running,
let alone sox's response or any description of the results.

On my 14.3.1 installation, the following works just fine.

$ sox file.wav piece_%4n.wav trim : newfile : restart
$ ls -l piece*wav
-rw-r--r--  1 hans  staff  1440080 Oct  1 21:01 piece_0001.wav
-rw-r--r--  1 hans  staff  1440080 Oct  1 21:01 piece_0002.wav
-rw-r--r--  1 hans  staff  1440080 Oct  1 21:01 piece_0003.wav
-rw-r--r--  1 hans  staff   368720 Oct  1 21:01 piece_0004.wav

> Any help ?

Probably not.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

Gmane