[Leaplist] teach me please about this code

Mr. Brunkow ssma at sunstatemartialarts.com
Thu Jan 3 19:32:21 GMT 2008


ok today i was in the need of converting m4a to mp3 formats for a video 
editing project.  after a bit of google.com/linux searching i found a 
very easy way to do this with faad and lame.  One of the pages I found 
had a nice little script that would allow me to convert the entire 
directory when 1 command.  I like that.

Now that I have copied someone else work I want to know what the script 
is telling the computer to do so i understand it a bit better. 

I also found a | line command that does things 1 file at a time and i 
understand that as it is just telling faad to open and lame to convert.  
simple enough.

faad -o - inputfile.m4a | lame - outputfile.mp3

that is easy enough to understand and works great.

but:

------------------------------
cat convert.sh
#!/bin/sh
#
# m4a to mp3 converting script for a directory
#
        for i in *.m4a
        do
                faad -o - "$i" | lame -h -b 192 - "${i%m4a}mp3"
        done
-------------------------------

is not so easy to understand.  the #!/bin/sh tells me it is just a bash script and i put in the comment about what this script is doing

but what is the rest?

thanks for the education.


-- 
Raymond L. Brunkow
5th Degree Black Belt
Chief Instructor and Owner
Sun State Martial Arts
(407) 786-2525



More information about the Leaplist mailing list