進入全部的子目錄做git pull - Linux

Table of Contents

請問一下,我想寫一個script好方便我把全部的子目錄做git pull的動作
這該如何寫?

目錄型式
a
b
top- c
d
e

abcde分別都是一個獨立的repo
本來是想用find,不過find好像會把全部的子目錄列出來
但我只要列出第一層的
而且用find感覺也不是最好的方法,不知道還有其它的方法嗎?

--

All Comments

Oliver avatarOliver2014-10-12
for $file in * do if [ -d $file ]; then .. done ??