くだらねえ質問はここに書き込め! Part 172 at LINUX
[2ch|▼Menu]
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