shell编程:for循环结构

shell编程:for循环结构

  用法1:

s1=test.
s2=.wav
s3=.mp3
s4=0
s5=00
i=0
str="sox ./${s1}${i}${s2} ./${1}${s3}"
 ./tts -c bcgirl.0.0.4.bin -b 1 -i input.txt -s 1.0 -speed 1.0
 
for i in 0 1
do
sox ./${s1}${i}${s2} ./${i}${s3}
done
rm ./*.wav

  用法2:

s1=test.
s2=.wav
s3=.mp3
s4=0
s5=00
i=0
str="sox ./${s1}${i}${s2} ./${1}${s3}"
 ./tts -c bcgirl.0.0.4.bin -b 1 -i input.txt -s 1.0 -speed 1.0
 
for((i=0;i<4;i++))
do
sox ./${s1}${i}${s2} ./${i}${s3}
done
rm ./*.wav

  

posted @ 2019-04-08 20:42  kay880  阅读(365)  评论(0编辑  收藏  举报