[Abcde-users] Patch to tidy the main routine, and avert loosing variable declarations by not using subshells

Roger rogerx.oss at gmail.com
Tue Mar 24 15:34:08 GMT 2015


And of course one last reference concerning parenthesis and curly braces or 
curly brackets:

{}  Block of code [curly brackets].
http://tldp.org/LDP/abs/html/special-chars.html#CODEBLOCKREF


Personally I think the author of these blocks within parenthesis (of the main 
routine and else where) might have been oblivious to the loss of variable 
definitions when using parenthesis and/or had no initial intention of reusing 
variables during processing the audio CD during intial code authoring.

Now we see a need for custom or user pre and post processing, or the need to 
see those (past) variable definitions.  However, we still may not get the 
expected values from those variables, as the script was not likely initially 
designed around the idea of custom pre and post processes.  So constantly 
double checking variable values within your custom pre and post processes using 
echo/printf is probably wise.

But with that stated, since variable definitions are now preservered using 
curly braces, it may introduce bugs where we once had thought a global variable 
remained the same or was once null, etc.  So far using bin/abcde.20150323 for 
extracting WAV PCM and Vorbis encoding, I see no problems.  But then on the 
flip, if the original author coded  expecting variables to be passed from the 
parenthesis subshell process (and was oblivious to the loss of variable 
definitions), then likely no problems for which I expect.  However even though, 
probably wise to keep an eye out for further bugs as previously mentioned.

Remember, there's about three sections of code blocks with pipes piping from a 
parenthesis subshell.  The likely original intention was likely to use curly 
braces.


Anyways, the patches here have been tested using Essential Mozart CD #1, 
extracting to PCM WAV and Vorbis, using cdda2wav. With an already cached CDDB 
profile.



-- 
Roger
http://rogerx.freeshell.org/



More information about the Abcde-users mailing list