くだらねえ質問はここに書き込め! Part 172
at LINUX
52:名無しさん@Vim%Chalice
09/02/18 21:20:08 87OyYhLo
>>18 >>24
どうもです。亀レスついでに勉強中のwav2mp3.shをはっときます。
#!/bin/bash
#this script will convert *.wav to *.mp3
#read path
echo "Enter the directory cd [path] *.wav and [ENTER]:"
read dir
#read VBR or CBR
echo "Enter [v] for VBR or [c] for CBR and [ENTER]:"
read br
#set br
if [ $br = v ]
then
echo "Enter the level[0-9(H-L)] for VBR and [ENTER]:"
read num
br=V
elif [ $br = c ]
then
echo "Enter the bps[32,64,96,128,192,256,320] for CBR and [ENTER]:"
read num
br=b
fi
#cd and mkdir for working and move *wav files and cd working dir
cd "$dir"
#lame:wav to mp3
for file in *.wav
do
/usr/bin/lame -h -$br $num "$file" "${file%wav}mp3"
sleep 6
done
echo "complete!"
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5348日前に更新/51 KB
担当:undef