On Sat, May 18, 2013 at 2:03 PM, Mike F. <[email protected]> wrote: > For some reason, the output from metaflac gets interpreted by printf as octal > with track numbers 08 and 09.
Actually all the tracks are getting interpreted as octal, because of the leading 0, but 01 to 07 are valid and identical to 1 to 7 in decimal, whereas 08 is invalid octal. A leading 0 is common in C and many other languages to denote octal. See http://en.wikipedia.org/wiki/Leading_zero#0_as_a_prefix > 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? Yes. Phillip -------------------- 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
