FOLDER="newmix" SEGMENTS=$(ls $FOLDER/seg-209-a1.ts) for SEGMENT in $SEGMENTS; do echo $SEGMENT ffmpeg -i $SEGMENT $SEGMENT.ogg done