回文章列表
作者oy.bbs@ptt.cc (歐耶~) 看板: linux
標題[問題] 移動多個目錄下檔案的問題...
時間批踢踢實業 (2008/03/31 Mon 13:36:55)
有幾個目錄長得大概像這樣
Super Man Season_1
Super Man Season_2
Super Man Season_3
Super Man Season_4
Super Man Season_5
.
.
.
.
Super Man Season_20

實在很懶得一個個cd進去mv出來
之前問朋友亂試一通成功後,現在怎麼試都試不出來,不知道哪裡錯了...

for i in "seq 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20";
do mv "Super Man Season_${I}"/* ../;
done
這樣會顯示錯誤找不到"Super Man Season_seq 1 2 3 4 5 ....."目錄與檔案...

for i in "seq 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20";
do mv Super\ Man\ Season_${I}/* ../;
done
這樣才正常分離成數行,可是又變成找不到seq目錄與檔案,找不到1目錄與檔案,
找不到2目錄與檔案....

麻煩指導一下,謝謝 ><

--
※ 發信站: 批踢踢實業坊(ptt.cc) 
◆ From: 118.167.195.223
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻