On Friday, May 10, 2013 01:29:57 Phillip Hellewell wrote:

> This is the offending line that is interpreting the track as octal:
>     prettyTrack=`printf "%02d" $track`
> 
> Try this instead:
>     prettyTrack="00$track"
>     prettyTrack="${prettyTrack: -2}"
> 

Thanks to all for the great suggestions, both for alternate conversion tools 
and for Phillip's suggestion to fix the script.

I'm setting up a large FLAC -> OGG batch test to try these recommendations.  

Just to make sure I'm clear about the script tweak ...
The original (prettyTrack=`printf "%02d" $track`) is *supposed to* use the 
"%02d" formatting of printf to give a string with two digit numbers--
theoretically, a leading zero if needed.

For some reason, the output from metaflac gets interpreted by printf as octal 
with track numbers 08 and 09.

The suggested:
>     prettyTrack="00$track"
>     prettyTrack="${prettyTrack: -2}"
makes a string of "00x" in line 1 (where x is the current track)
then line 2 takes just the right-most 2 characters of the string, yes?


-- 
Mike F.
--------------------
BYU Unix Users Group
http://uug.byu.edu/

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list

Reply via email to