[Vorbis] Re: Recursively vcutting
Kelsang Norpel
norpel at meditateinscotland.org
Sun Jan 2 10:45:09 PST 2005
Andy, or whoever else might be interested,
I've modified the code so that it preceded the numbers less than 10 by a 0 so
that it will play correctly in a player, and list correctly in directory
#!/bin/bash
split=$1;shift
file="$*"
name="${file%.ogg}" # strip extension.
cp "$file" /tmp/file-$$.ogg
stop=0
n=0
while [ $stop -eq 0 ] ; do
if [ "$n" -lt "10" ]
then
m="0$n"
else
m=$n
fi
echo "cutting to ${name}-$m.ogg"
vcut /tmp/file-$$.ogg "${name}-$m.ogg" /tmp/remainder-$$.ogg "$split"
stop=$?
mv /tmp/remainder-$$.ogg /tmp/file-$$.ogg
n=$(( $n + 1 ))
done
rm /tmp/file-$$.ogg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20050102/f8f53212/attachment.pgp
More information about the Vorbis
mailing list