Heya JM! :-) On 2/23/06, JM Ibanez <[EMAIL PROTECTED]> wrote: > Since there have been several threads talking about bash(1) and > one-liners and what-not, I've decided to join in the fray. I'll > probably try doing several useful scripts every once in a while for > newbies (and interested oldbies) to dissect and discuss. :)
Cool! :D I do much of my scripts in bash nowadays, so this is quite welcome. > There are several places for improvement-- exercises left to the reader: [...] > - The script does not check whether or not the components it depends > on are installed This can be done by tests, e.g.: CDPARANOIA=$(which cdparanoia) if [ ! -x $CDPARANOIA ] ; then echo "cdparanoia not found!" exit 1 fi > - There is no way (yet) to control the arguments to cdparanoia and > flac -- it should be easy to provide options for doing so Hmm I imagine using something like `--' in the args to separate cdparanoia/flac options from the script's own options... > - There is no way to 'resume' ripping or encoding (you can, however, > interrupt the script after ripping and before encoding, then tell the > script to only do encoding via the -n option You can probably use signals, but I haven't checked on that yet. Another way might be to used buffered streams... Cheers, Zakame -- Zak B. Elep || http://zakame.spunge.org [EMAIL PROTECTED] || [EMAIL PROTECTED] 1486 7957 454D E529 E4F1 F75E 5787 B1FD FA53 851D
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

