Possible Duplicate:How do ${0##*/} and ${0%/*} work? I have encountered this type of syntax somewhere on the web  :for i in *.avido     ffmpeg -i $i ${i%.avi}.mp4donehow does this ${i%.avi}.mp4 and how can I use it ?
What does this syntax mean ${i%.avi}.mp4
bash;shell
This is known as a parameter expansion. Everything to the right of .avi is removed, and .mp4 is concatenated onto the result. If $i is foo.avi, the result would be foo.mp4. BashFAQ 73 has some good examples of other ways you can use parameter expansions for string manipulation.