用Shell整理音樂檔 - Linux

By Eartha
at 2011-02-11T00:27
at 2011-02-11T00:27
Table of Contents
之前土法煉鋼,用rhythmbox一個個的改資訊
趁年假摸一下bash,現在想寫個sh來做這些動作
但遇到了變數的問題
i=0;
for list in *.mp3;
do i=$(($i+1));
id3 -T "$i" $list;
done
可是list歌單裡的歌名有空格,所以會出錯
因為檔名遇到空格要加\
目前卡在這裡
有試過用rename或sed來把$list檔名取代成有\的字串
但還沒成功,我想我跟本是想錯方向了
請給我個指示吧,謝謝
--
趁年假摸一下bash,現在想寫個sh來做這些動作
但遇到了變數的問題
i=0;
for list in *.mp3;
do i=$(($i+1));
id3 -T "$i" $list;
done
可是list歌單裡的歌名有空格,所以會出錯
因為檔名遇到空格要加\
目前卡在這裡
有試過用rename或sed來把$list檔名取代成有\的字串
但還沒成功,我想我跟本是想錯方向了
請給我個指示吧,謝謝
--
Tags:
Linux
All Comments

By Faithe
at 2011-02-12T01:06
at 2011-02-12T01:06

By John
at 2011-02-12T23:56
at 2011-02-12T23:56

By Ina
at 2011-02-13T06:50
at 2011-02-13T06:50

By Michael
at 2011-02-15T16:21
at 2011-02-15T16:21

By Eden
at 2011-02-17T20:03
at 2011-02-17T20:03

By Isla
at 2011-02-19T18:32
at 2011-02-19T18:32

By Joseph
at 2011-02-24T08:41
at 2011-02-24T08:41

By Ida
at 2011-02-26T03:26
at 2011-02-26T03:26

By Delia
at 2011-03-02T12:23
at 2011-03-02T12:23
Related Posts
網卡驅動程式安裝??

By Quintina
at 2011-02-10T16:21
at 2011-02-10T16:21
Win7 x64下利用VirtualBox跑Ubuntu x64

By Enid
at 2011-02-09T21:59
at 2011-02-09T21:59
Linux C function 的位

By Rebecca
at 2011-02-09T20:16
at 2011-02-09T20:16
想請教有關Freenx的問題

By Thomas
at 2011-02-09T20:11
at 2011-02-09T20:11
關於 不使用重複的密碼的設定

By Dorothy
at 2011-02-09T18:29
at 2011-02-09T18:29