Results 1 to 3 of 3

Thread: need some bash scripting help

  1. #1

    need some bash scripting help

    Ok, I am writing a shell script to automate the encoding of cds to ogg using cdparanoia and then oggenc. It will take the track01.cdda.wav file and name it from a naming file that you input before hand. It works, mostly. I have an iteration problem, and I cant figure out a way around it, as I have only been scripting for a few days now, with whatever info I can find on the net. Here is the code, the problem is fairly obvious.
    echo "what is the name of your title file?"
    read title_file                             
    cdparanoia -Q          
    cdparanoia -vwB        
    for i in *.wav; do
            for t in `cat "$title_file"`;do                                                                     
            oggenc "$i" -q 5 -t "$t"
    rm -f "$i".wav                

  2. #2

    Re:need some bash scripting help

    If I knew what cdparanoia -Q and -vwB and oggenc -q 5 -t did it would be a bit easier to understanding what's actually being created etc.

    What isn't working exactly?

    AFAIK you don't need to quote your variables.

    for t in `cat $title_file`; do

    should work fine. I dunno if that helps with anything mind you just less typing

    With a bit more info i'll do my best to help you

  3. #3

    Re:need some bash scripting help

    cdparanoia rips cds to wav files (or aiff) and oggenc encodes the resulting wav files to ogg vorbis format. Im actually past the problem at this point, and the basic script works. Im adding some extra functions to it right now, and will post what I have when I get it all done.

Similar Threads

  1. Bash scripting and the stderr
    By 10Dedfish in forum Programming
    Replies: 2
    Last Post: 12-30-2003, 01:12 PM
  2. bash scripting question
    By seanmclemon in forum Programming
    Replies: 7
    Last Post: 09-07-2003, 12:58 AM
  3. Bash scripting question
    By kenshi in forum Programming
    Replies: 6
    Last Post: 01-02-2003, 08:36 PM
  4. bash scripting and quoting
    By in forum Programming
    Replies: 5
    Last Post: 03-21-2002, 12:51 AM
  5. Bash Scripting
    By cuban in forum Programming
    Replies: 3
    Last Post: 09-10-2001, 01:03 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts