还是script问题

4 views
Skip to first unread message

wd

unread,
May 27, 2010, 2:25:26 AM5/27/10
to sh...@googlegroups.com, ubuntu-sg-zh
某目录下有这些文件
Underground 5.0.ape Underground 5.0.cue Underground 6.0.ape
Underground 6.0.cue
script如下
1 #!/bin/bash
2
3 apelist=$(ls | grep ape$)
4 #echo -e $apelist
5
6 echo "$apelist" | while read apefile
7 do
8 echo -e "$apefile"
9 wavlist="$(echo $apefile | sed 's/ape/wav/g')"
10 echo -e $wavlist
11 mac "$apefile" "$wavlist" -d
12 echo "$wavlist" | while read wavfile
13 do
14 lame -h -b 320
"$wavfile"
15 done
16 mp3list=$( echo $wavlist | sed 's/wav/wav.mp3/g')
17 echo -e $mp3list
18 cuelist=$(echo $apefile | sed 's/ape/cue/g')
19 echo -e $cuelist
20 mp3splt -c "$cuelist" -o @n-@t "$mp3list"
21 rm "$mp3list"
22 fmp3="$(ls | grep mp3$)"
23 cuetag "$cuelist" "$(ls | grep mp3$)"
24 done
25
26 mp3dir=$(ls | grep ape$ | sed 's/.ape//g')
27 echo "$mp3dir" | while read mp3fl
28 do
29 echo -e "$mp3fl"
30 mkdir "$mp3fl"
31 done

运行一路都没问题 .. 可是到了22和23行的时候问题来了
输出如下,前后正常输出去掉
-----------------------------------------------------------------------
File "6-Jigga What _ Faint (Live).mp3" created
Processed 47709 frames - Sync errors: 0
file split (EOF)


+-----------------------------------------------------------------------------+
|NOTE: When you use cddb/cue, split files might be not very precise due
to:|
|1) Who extracts CD tracks might use "Remove silence" option. This
means that |
| the large mp3 file is shorter than CD Total time. Never use this
option. |
|2) Who burns CD might add extra pause seconds between tracks. Never
do it. |
|3) Encoders might add some padding frames so that file is longer
than CD. |
|4) There are several entries of the same cd on CDDB, find the best for
yours.|
| Usually you can find the correct splitpoints, so good luck! |

+-----------------------------------------------------------------------------+
| TRY TO ADJUST SPLITS POINT WITH -a OPTION. Read man page for more
details! |

+-----------------------------------------------------------------------------+

warning: number of files does not match number of tracks
Error opening MP3: 1-Somewhere I Belong (Live).mp3
2-Breaking the Habit (Live).mp3
3-Public Service Announcement - Intro (Live).mp3
4-Dirt Off Your Shoulder _ Lying from You (Live).mp3
5-Big Pimpin' _ Papercut (Live).mp3
6-Jigga What _ Faint (Live).mp3: No such file or directory
Error opening MP3: 1-Somewhere I Belong (Live).mp3
2-Breaking the Habit (Live).mp3
3-Public Service Announcement - Intro (Live).mp3
4-Dirt Off Your Shoulder _ Lying from You (Live).mp3
5-Big Pimpin' _ Papercut (Live).mp3
6-Jigga What _ Faint (Live).mp3: No such file or directory
Error opening MP3: 1-Somewhere I Belong (Live).mp3
2-Breaking the Habit (Live).mp3
3-Public Service Announcement - Intro (Live).mp3
4-Dirt Off Your Shoulder _ Lying from You (Live).mp3
5-Big Pimpin' _ Papercut (Live).mp3
6-Jigga What _ Faint (Live).mp3: No such file or directory
Underground 6.0.ape
Underground 6.0.wav
--- Monkey's Audio Console Front End (v 3.99) (c) Matthew T. Ashland ---
-----------------------------------------------------------------
主要是在warning的地方 .. 用cuetag写入tag出错
cue文件一定没有问题
cuetag cuefile *.mp3写入没有问题

先谢谢了

--
Sign by WD
http://wdstudio.blogbus.com

Reply all
Reply to author
Forward
0 new messages