くだらねえ質問はここに書き込め! Part 172at LINUX
くだらねえ質問はここに書き込め! Part 172 - 暇つぶし2ch52:名無しさん@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!"


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch